Well I'm having problems with EasyOgg in that it's not playing anything, and it's not throwing any exceptions. I used a random ogg that plays through xmms but won't in my application:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| import java.io.IOException; import java.util.Scanner; import org.newdawn.easyogg.OggClip;
public class SoundTest { OggClip clip; public static void main(String args[]) { new SoundTest(); } public SoundTest() { try { clip = new OggClip("startup2.ogg"); clip.loop(); System.out.println("sound looping!"); } catch (IOException e) { e.printStackTrace(); } Scanner input=new Scanner(System.in); do { System.out.println("Quit?"); } while(!input.nextLine().equals("Y")); } } |
sound looping! prints, and Quit? prints, but there's no sound playing

EDIT:debugger output with breakpoint on clip.loop();
http://dec19.imghost.us/uEzu.pngEDIT2: adding Thread.sleep(100); after clip.loop(); makes it work, but is there a more reliable way to ensure that the sound will play?