Closed finnkuusisto closed 12 years ago
http://www.java-gaming.org/topics/selecting-non-default-mixer/26342/view.html
The upshot is that the mixer selected by AudioSystem.getLine() may not be low latency. Typically, the earlier mixers in the array returned by getMixerInfo() will be better.
TinySound now picks the first Mixer that can open a line. There is also now an alternative init() function for those who want to be able to pick which Mixer the line is opened on.
I noticed some major latency issues using TinySound on my old laptop (currently running Fedora 14). After some testing I determined that the latency wasn't coming from TinySound, but the default Mixer selected when opening the SourceDataLine. The latency sounds on the order of 100s of ms after completion of writing to the line. Testing all of the Mixers available, I found that the Pulse Audio mixer did not produce the latency issue. Perhaps TinySound should try to select a better Mixer than the default.