Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
public MusicBox(boolean loopForever){
try {
InputStream soundbStream = this.getClass().getResourceAsStream("soundbank.gm");
//setup sequencer and synthesizer for playing
sequencer = MidiSystem.getSequencer(false);
synthi = MidiSystem.getSynthesizer();
synthi.open();
//load soundbank
soundbank = MidiSystem.getSoundbank(soundbStream);
synthi.loadAllInstruments(soundbank);
receiver = synthi.getReceiver();
if(loopForever)
sequencer.setLoopCount(Sequencer.LOOP_CONTINUOUSLY);
} catch (Exception e) {
e.printStackTrace();
}
}
Diese Aussage lässt mich vermuten das *so fern es jetzt nur Java7 betrifft* der Ladecode intern geändert wurde und da irgendwas mit deiesem komprimiertem InputStream nicht klar kommt. Es kann aber auch sein das deine Soundbank in einer Art komprimiert ist die Java 7 einfach nicht versteht.These parsers must be able to mark the stream, read enough data to determine whether they support the stream, and, if not, reset the stream's read pointer to its original position. If the input stream does not support this, this method may fail with an IOException.