I can get a sound to play but not stop
Ive been playing around with a sequencer and i can get my sounds to start but when i try to stop them it does nothing, here is my coding attempt on it, ive made sure to test and see if the int is being called correctly and it seems to be.
String music[] ={"jingle1","jingle2"};
Sequencer sequencer =null;
Sequence song =null;
try{
sequencer = MidiSystem.getSequencer();
sequencer.open();
if (i2 == 99){
sequencer.stop();
}else{
URL newsUrl =new URL("http://dnd.no-ip.org/music/"+music[i2]+".mid");
song = MidiSystem.getSequence(
newsUrl.openStream());
sequencer.setSequence(song);
sequencer.start();
}
}
catch (MidiUnavailableException e){
}
catch (InvalidMidiDataException e){
}
catch (IOException e){
}

