From 04b5287c36da93393e502969aa67f6116c2f2758 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 4 Aug 2011 19:05:55 -0700 Subject: [PATCH] Don't capture more samples after stopping Ideally, stopping would flush of the remaining data from OpenAL's capture buffer. --- capture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capture.c b/capture.c index a56dbbd..d4640aa 100644 --- a/capture.c +++ b/capture.c @@ -161,7 +161,7 @@ static DWORD CALLBACK DSCBuffer_thread(void *param) avail = 0; buf = This->buf; alcGetIntegerv(buf->dev, ALC_CAPTURE_SAMPLES, 1, &avail); - if(avail == 0) + if(avail == 0 || !buf->playing) continue; EnterCriticalSection(&This->crst); -- 2.11.4.GIT