Dynamically choose line buffer sizes on Pi to reduce audio lag

This commit is contained in:
Cameron Gutman
2014-01-12 20:47:30 -05:00
parent 36638895b8
commit e0023226d4

View File

@@ -135,15 +135,8 @@ public class JavaxAudioRenderer implements AudioRenderer {
this.channelCount = channelCount;
this.sampleRate = sampleRate;
// Workaround OS X's bad Java mixer
if (System.getProperty("os.name").contains("Mac OS X")) {
createSoundLine(STARING_BUFFER_SIZE);
reallocateLines = true;
}
else {
createSoundLine(DEFAULT_BUFFER_SIZE);
reallocateLines = false;
}
createSoundLine(STARING_BUFFER_SIZE);
reallocateLines = true;
}
}