File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Playing Audio file using JMF

 
yspl india
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
I am J.Shobana I am trying to play an audio wave file using Java Media Framework(JMF). I downloaded JMF 2.1.1e and set the JMFHOME and the corresponding CLASSPATH and PATH.
I am able to execute my code without an error but i am not able to play the wave file. Whereas i am able to play the same wave file using ordinary Java program.

The logic is first i am using

URL url = new URL("file : path of the wave file");
Player player=null;
player=Manager.createPlayer(url);
player.start();
System.out.println("Finished");

Now i don't get any error and i get a keystroke sound but if i have it as

URL url = new URL("file : path of the wave file");
Player player=null;
player=Manager.createPlayer(url);
player.start();
System.out.println("Finished");
player.stop();
player.close();

I get an error:unable to prefetch com.sun.media.PlaybackEngine

Please give me a solution. Thanks in advance.


With Regards,
J.Shobana.

[ August 16, 2005: Message edited by: yspl india ]

[ August 16, 2005: Message edited by: yspl india ]
[ August 16, 2005: Message edited by: yspl india ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic