aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r--Alc/backends/winmm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index 0a186662..1a9f099b 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -683,14 +683,14 @@ static ALCuint WinMMAvailableSamples(ALCdevice *pDevice)
return RingBufferSize(pData->pRing);
}
-static void WinMMCaptureSamples(ALCdevice *pDevice, ALCvoid *pBuffer, ALCuint lSamples)
+static ALCenum WinMMCaptureSamples(ALCdevice *pDevice, ALCvoid *pBuffer, ALCuint lSamples)
{
WinMMData *pData = (WinMMData*)pDevice->ExtraData;
- if(WinMMAvailableSamples(pDevice) >= lSamples)
- ReadRingBuffer(pData->pRing, pBuffer, lSamples);
- else
- alcSetError(pDevice, ALC_INVALID_VALUE);
+ if(WinMMAvailableSamples(pDevice) < lSamples)
+ return ALC_INVALID_VALUE;
+ ReadRingBuffer(pData->pRing, pBuffer, lSamples);
+ return ALC_NO_ERROR;
}