aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/oss.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/oss.c')
-rw-r--r--Alc/backends/oss.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c
index 79830c06..9206343b 100644
--- a/Alc/backends/oss.c
+++ b/Alc/backends/oss.c
@@ -461,19 +461,17 @@ static void oss_stop_capture(ALCdevice *pDevice)
data->doCapture = 0;
}
-static ALCuint oss_available_samples(ALCdevice *pDevice)
+static ALCenum oss_capture_samples(ALCdevice *pDevice, ALCvoid *pBuffer, ALCuint lSamples)
{
oss_data *data = (oss_data*)pDevice->ExtraData;
- return RingBufferSize(data->ring);
+ ReadRingBuffer(data->ring, pBuffer, lSamples);
+ return ALC_NO_ERROR;
}
-static ALCenum oss_capture_samples(ALCdevice *pDevice, ALCvoid *pBuffer, ALCuint lSamples)
+static ALCuint oss_available_samples(ALCdevice *pDevice)
{
oss_data *data = (oss_data*)pDevice->ExtraData;
- if(oss_available_samples(pDevice) < lSamples)
- return ALC_INVALID_VALUE;
- ReadRingBuffer(data->ring, pBuffer, lSamples);
- return ALC_NO_ERROR;
+ return RingBufferSize(data->ring);
}