diff --git a/client/src/client/Client.java b/client/src/client/Client.java index d4ae164..571da67 100755 --- a/client/src/client/Client.java +++ b/client/src/client/Client.java @@ -455,7 +455,7 @@ public class Client implements IThreadListener { @Variable(name = "snd_enabled", category = CVarCategory.SOUND, display = "Tonausgabe") public boolean soundEnabled = true; @Variable(name = "snd_buffer_size", category = CVarCategory.SOUND, min = 0, max = 1048576, display = "Puffergröße") - public int soundBufferSize = 2048; + public int soundBufferSize = 16384; @Variable(name = "snd_frame_size", category = CVarCategory.SOUND, min = 2, max = 8192, display = "PCM-Intervall") public int soundFrameSize = 32; diff --git a/client/src/client/audio/AudioInterface.java b/client/src/client/audio/AudioInterface.java index 2e7c105..075b5df 100644 --- a/client/src/client/audio/AudioInterface.java +++ b/client/src/client/audio/AudioInterface.java @@ -138,12 +138,12 @@ public class AudioInterface implements Runnable { public void run() { AudioFormat format = new AudioFormat(Encoding.PCM_SIGNED, 48000, 16, 2, 2 * 2, 48000, false); - Info info = new Info(SourceDataLine.class, format, this.devbufsize); + Info info = new Info(SourceDataLine.class, format, this.devbufsize == 0 ? AudioSystem.NOT_SPECIFIED : this.devbufsize); try { this.line = (SourceDataLine)AudioSystem.getLine(info); - this.line.open(format, this.devbufsize); + this.line.open(format, this.devbufsize == 0 ? AudioSystem.NOT_SPECIFIED : this.devbufsize); } - catch(LineUnavailableException e) { + catch(Exception e) { this.line = null; Log.SOUND.error(e, "Konnte Audiogerät nicht öffnen"); }