• 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

Play Mp3 in Java

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, i am currently trying to use javazoom to play mp3 files. So far i have an MP3 file playing using:
import java.io.*;
import javazoom.jl.player.Player;
import javazoom.jl.decoder.JavaLayerException;
public class PlayMP3
{
public static void main(String args[])
{
try
{
InputStream in = new
FileInputStream("Demo.mp3");
Player clip = new Player(in);
clip.play();
/**Problem here below**/
clip.close();
}
catch(JavaLayerException e1)
{
System.out.println("mp3error!!!");
}
catch(IOException e)
{
System.out.println("file error");
}
}
Problem 1: this will play "Demo.mp3" in the command prompt but it does not reach the clip.close command.
Problem 2: i did not see any functionality on the doc. for fast-forward/rewind. Can it be done with javazoom?
Cheers
Gavin
 
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at this:
http://www.javazoom.net/jlgui/jlgui.html
or try posting in their forum:
http://www.javazoom.net/services/forums/viewForum.jsp?forum=7
brian
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic