mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-04-17 22:10:26 +00:00
Dynamically choose line buffer sizes on Pi to reduce audio lag
This commit is contained in:
@@ -135,15 +135,8 @@ public class JavaxAudioRenderer implements AudioRenderer {
|
|||||||
this.channelCount = channelCount;
|
this.channelCount = channelCount;
|
||||||
this.sampleRate = sampleRate;
|
this.sampleRate = sampleRate;
|
||||||
|
|
||||||
// Workaround OS X's bad Java mixer
|
createSoundLine(STARING_BUFFER_SIZE);
|
||||||
if (System.getProperty("os.name").contains("Mac OS X")) {
|
reallocateLines = true;
|
||||||
createSoundLine(STARING_BUFFER_SIZE);
|
|
||||||
reallocateLines = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
createSoundLine(DEFAULT_BUFFER_SIZE);
|
|
||||||
reallocateLines = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user