• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

problem with JMF on Linux

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Everybody

I am using JMF to play audio of an mp3 file but failing to do so...

can somebody help... when I am compiling and running the same .java file on windows platform it's working...
but it's not working on Linux platform. It is giving the folowing exception when run on Red Hat Linux 9.0

but Linux was able to play the same mp3 file using media players that exists on it.

Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian, Signed, 12000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@186768e
Error: Unable to realize com.sun.media.PlaybackEngine@186768e

This is the javacode that I am using...

import javax.media.*;
import java.io.*;

public class audio
{
Player p;

public audio()
{
try
{
File f = new File("./1.mp3");
p = Manager.createPlayer(f.toURL());
p.start();
}
catch(Exception e)
{
System.out.println("Error in constructor : "+e);
}
}
public static void main(String argv[])
{
audio a = new audio();
}
};

Regards
Jyothsna
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey there,

I know that java-1.4.2 does not have such great support for the ALSA sound system. So you may want to give java-1.5 a shot.

Hope this helps,


scoon
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic