I want to be able to play sound files in my program. Where should I look?
This thread is rather old but I have determined an option that could prove useful.
Instead of using the Java AudioStream
library you could use an external program like Windows Media Player or VLC and run it with a console command through Java.
String command = "\"C:/Program Files (x86)/Windows Media Player/wmplayer.exe\" \"C:/song.mp3\"";
try {
Process p = Runtime.getRuntime().exec(command);
catch (IOException e) {
e.printStackTrace();
}
This will also create a separate process that can be controlled it the program.
p.destroy();
Of course this will take longer to execute than using an internal library but there may be programs that can start up faster and possibly without a GUI given certain console commands.
If time is not of the essence then this is useful.