I'm using javax's midi classes to play a MIDI in the background of my program.
When I compile in Eclipse, the MIDI plays fine but there is some sort of weird echoing feedback noise which is almost as loud as the MIDI itself.
My code:
public class BGM {
private String filename;
Sequencer sequencer;
Sequence sequence;
public BGM(String filename){
try{
sequence = MidiSystem.getSequence(new File(filename));
sequencer = MidiSystem.getSequencer();
sequencer.open();
sequencer.setSequence(sequence);
sequencer.start();
} catch(Exception e){
}
}
}
This has been the case with every sound file i've tried to play from Java, in my code or anyone else's. MP3, wav or midi.
If you'd like a sample of the sound I can get that too
Thanks for the help! :D