mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-02-16 10:30:47 +00:00
this seems to have fixed the audio latency, need to check on other systems
I read that OSX requires the larges buffer size so this should be plenty for other systems as well. However, I did notice that making the buffer any larger caused a negative effect in terms of latency.
This commit is contained in:
@@ -34,10 +34,10 @@ public class JavaxAudioRenderer implements AudioRenderer {
|
||||
@Override
|
||||
public void streamInitialized(int channelCount, int sampleRate) {
|
||||
AudioFormat audioFormat = new AudioFormat(sampleRate, 16, channelCount, true, true);
|
||||
DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat, OpusDecoder.getMaxOutputShorts()*8);
|
||||
DataLine.Info info = new DataLine.Info(SourceDataLine.class, audioFormat, OpusDecoder.getMaxOutputShorts());
|
||||
try {
|
||||
soundLine = (SourceDataLine) AudioSystem.getLine(info);
|
||||
soundLine.open(audioFormat);
|
||||
soundLine.open(audioFormat, 131072);
|
||||
soundLine.start();
|
||||
} catch (LineUnavailableException e) {
|
||||
soundLine = null;
|
||||
|
||||
Reference in New Issue
Block a user