I've been working on a simple AudioMixer. The class combines audio data from various sources into a single SourceDataLine. It works pretty well, and I posted an example as an
Applet in order to get more feedback.
AudioMixerDemoApplet
One of the classes I wrote to use with this AudioMixer is modelled after (to some extent) a JavaSound "Clip." With my ClipTrack, a short audio file can be loaded into memory, and played back. I put in the ability to retrigger and play back the data in an overlapping fashion, and to play the data back at different speeds. A single sound effects file (gunshot3.wav) is the source file for the ClipTrack used in my demo, and the top five buttons on the demo all make use of it.
My problem is this. One person (of several that have run the Applet with no problem) has written back to report an I/O exception when using this applet. During the start, he gets an Exception. The message points to the code line where I read in the audio data.
The message indicates a "mark/reset not supported" condition:
Here is the starting portion of the error message.
I am at a loss as to why this might not work, and as to how to trouble shoot. I can't generate the error. Only one person gets it (so far). I put a question to him as to his
Java version (he might have moved up to Java 7, I'm using the latest version of 6).
Why would a method of reading in .wav files that has worked in the past suddenly stop working in some cases? Is there something different, for example, about Java 7 where InputFile's that previously were fine (in terms of mark/reset capability) are now not supporting this? Is there another way to bring in an audio file resource that is considered a best practice?