From 5499c2cea54332433dfb3af57c6bef9b75238609 Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Fri, 13 Dec 2013 00:22:35 -0500 Subject: [PATCH] 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. --- .../src/com/limelight/binding/audio/JavaxAudioRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/limelight-pc/src/com/limelight/binding/audio/JavaxAudioRenderer.java b/limelight-pc/src/com/limelight/binding/audio/JavaxAudioRenderer.java index 688c517..d4af9ca 100644 --- a/limelight-pc/src/com/limelight/binding/audio/JavaxAudioRenderer.java +++ b/limelight-pc/src/com/limelight/binding/audio/JavaxAudioRenderer.java @@ -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;