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.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index 1a9f099b..67182950 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -677,20 +677,17 @@ static void WinMMStopCapture(ALCdevice *pDevice)
waveInStop(pData->hWaveHandle.In);
}
-static ALCuint WinMMAvailableSamples(ALCdevice *pDevice)
+static ALCenum WinMMCaptureSamples(ALCdevice *pDevice, ALCvoid *pBuffer, ALCuint lSamples)
{
WinMMData *pData = (WinMMData*)pDevice->ExtraData;
- return RingBufferSize(pData->pRing);
+ ReadRingBuffer(pData->pRing, pBuffer, lSamples);
+ return ALC_NO_ERROR;
}
-static ALCenum WinMMCaptureSamples(ALCdevice *pDevice, ALCvoid *pBuffer, ALCuint lSamples)
+static ALCuint WinMMAvailableSamples(ALCdevice *pDevice)
{
WinMMData *pData = (WinMMData*)pDevice->ExtraData;
-
- if(WinMMAvailableSamples(pDevice) < lSamples)
- return ALC_INVALID_VALUE;
- ReadRingBuffer(pData->pRing, pBuffer, lSamples);
- return ALC_NO_ERROR;
+ return RingBufferSize(pData->pRing);
}