From d5889e4c4cca175bd7dcd0a7249361e7b8bc908b Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Thu, 3 Jan 2013 22:55:01 +0100 Subject: [PATCH] doubled audio decoding buffer, don't know if it help against the sporadically hand ups --- Vocaluxe/Lib/Sound/CPortAudioPlay.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs index 55072856..79a63a4f 100644 --- a/Vocaluxe/Lib/Sound/CPortAudioPlay.cs +++ b/Vocaluxe/Lib/Sound/CPortAudioPlay.cs @@ -384,7 +384,8 @@ namespace Vocaluxe.Lib.Sound class PortAudioStream { - const long BUFSIZE = 50000L; + const long BUFSIZE = 100000L; + const long BEGINREFILL = 80000L; private CSyncTimer _SyncTimer; private bool _Initialized; @@ -760,7 +761,7 @@ namespace Vocaluxe.Lib.Sound bool DoIt = false; lock (_LockData) { - if (!_skip && BUFSIZE - 10000L > _data.BytesNotRead) + if (!_skip && BEGINREFILL > _data.BytesNotRead) DoIt = true; } @@ -792,7 +793,7 @@ namespace Vocaluxe.Lib.Sound { _data.Write(Buffer); _TimeCode = Timecode; - if (_data.BytesNotRead < BUFSIZE - 10000L) + if (_data.BytesNotRead < BEGINREFILL) { _waiting = false; EventDecode.Set(); @@ -866,7 +867,7 @@ namespace Vocaluxe.Lib.Sound } } - if (_data.BytesNotRead < BUFSIZE - 10000L) + if (_data.BytesNotRead < BEGINREFILL) { EventDecode.Set(); _waiting = false;