Hi everyone,
I have an applet and I want it to have a background midi file. I've so far implement the classes found on Sun's site AppletSoundList and AppletSoundLoader.
This is working well if I give it enough time to load the midi before starting it...so far I've been doing that using a simple Thread.sleep...this obviously won't work once I deploy online since the clients connection speed will vary and a fixed Thread.sleep will not be optimal.
I've looked into MediaTracker but it seems like it doesn't support audio, only images...is there a way using the two class I have to tell the applet to wait for the audio clip? I was going to start the loop in the start() method but obviously if the sounds isn't loaded that will cause a problem...
Thanks a bunch if you can help! I would really appreciate it.
I have an applet and I want it to have a background midi file. I've so far implement the classes found on Sun's site AppletSoundList and AppletSoundLoader.
This is working well if I give it enough time to load the midi before starting it...so far I've been doing that using a simple Thread.sleep...this obviously won't work once I deploy online since the clients connection speed will vary and a fixed Thread.sleep will not be optimal.
I've looked into MediaTracker but it seems like it doesn't support audio, only images...is there a way using the two class I have to tell the applet to wait for the audio clip? I was going to start the loop in the start() method but obviously if the sounds isn't loaded that will cause a problem...
Thanks a bunch if you can help! I would really appreciate it.