Why am I getting a strange hissing from this? It plays the first song fine, but than when it turns off the first song and plays the second the first song starts hissing at me.
public class sound
{
int max_bgms = 2;
OggClip bgm[];
public sound()
{
bgm = new OggClip[max_bgms];
try{
for(int i = 0; i < max_bgms; i++)
bgm[i] = new OggClip("bgm" + i + ".ogg");
}
catch(Exception e)
{
e.printStackTrace();
}
}
public void playBGM(int num)
{
try{
for(int i = 0; i < max_bgms; i++)
bgm[i].stop();
bgm[num].loop();
}
catch(Exception e)
{
e.printStackTrace();
}
}
}