From e540964ffcf07e8cbc4d39d06f3621a5e19adf12 Mon Sep 17 00:00:00 2001 From: dmitrykos Date: Tue, 20 Jul 2010 21:01:07 +0000 Subject: [PATCH] wasapi: - fixed frames preloading for buffer mode - paUtilFixedHostBufferSize --- src/hostapi/wasapi/pa_win_wasapi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hostapi/wasapi/pa_win_wasapi.c b/src/hostapi/wasapi/pa_win_wasapi.c index 25bd67f..ff4a3d3 100644 --- a/src/hostapi/wasapi/pa_win_wasapi.c +++ b/src/hostapi/wasapi/pa_win_wasapi.c @@ -3888,6 +3888,12 @@ PA_THREAD_FUNC ProcThreadPoll(void *param) UINT32 frames = 0; if ((hr = PollGetOutputFramesAvailable(stream, &frames)) == S_OK) { + if (stream->bufferMode == paUtilFixedHostBufferSize) + { + if (frames >= stream->out.framesPerBuffer) + frames = stream->out.framesPerBuffer; + } + if (frames != 0) { if ((hr = ProcessOutputBuffer(stream, processor, frames)) != S_OK) -- 2.43.0