I’ve been working on a sound-based game that’s using the sampled audio stream write(byte[]) call as the timer, since the JavaDoc says that the write command will wait until the buffer has sufficient capacity before writing the data and returning.
On Windows JDK 1.5 and 1.6, this method allows for smooth time increments between each write. However, on Linux and Mac OS X (more apparent on Linux), the intervals between the writes seems to fluctuate, making the video seem to stutter (audio playback doesn’t have any clear interruption, though).
An earlier post references the problem with playing both MIDI and sampled sound, but that’s not what I’m dealing with here. Is the source of the issue the JDK implementation for the platform, or is there something in the Java Sound setup that I can do to make the timing more reliable? Thanks.