EDIT -
I am having some problems implementing this. I can’t seem to find any documentation on the problem I’m having, so hopefully someone can help.
Here’s my stack trace-
Starting up SoundSystem…
Initializing No Sound
(Silent Mode)
SoundSystem shutting down…
Caught InterruptedException while attempting to open the default MIDI sequencer. Trying again.
Error in class ‘MidiChannel’
Unable to load Midi file in method ‘setSequence’.
Error in class ‘MidiChannel’
Exception in method ‘play’
ERROR MESSAGE:
sequence not set
STACK TRACE:
com.sun.media.sound.RealTimeSequencer.start(Unknown Source)
paulscode.sound.MidiChannel.play(MidiChannel.java:650)
paulscode.sound.Library.play(Library.java:665)
paulscode.sound.SoundSystem.CommandPlay(SoundSystem.java:2076)
paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2599)
paulscode.sound.CommandThread.run(CommandThread.java:121)
Author: Paul Lamb, www.paulscode.com
Here’s my sound class:
package com.natekramber.main;
import paulscode.sound.SoundSystem;
public class Sound extends SoundSystem {
Main main;
public Sound(Main main)
{
this.main = main;
backgroundMusic("m", "snd/song.mid", true);
cleanup();
}
}
Seems fairly simple enough. I don’t know what could be causing it to do this.
Also, this happens no matter what I set the filepath to. I could set it to “oldcorn.poop” and the error doesn’t change.
p.s. Sometimes I don’t get an error, it just initialized then shuts down like this-
Starting up SoundSystem…
Initializing No Sound
(Silent Mode)
SoundSystem shutting down…
Author: Paul Lamb, www.paulscode.com
Thanks,
-Nathan