aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r--Alc/backends/pulseaudio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index 804ceacb..2382a708 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -1297,14 +1297,14 @@ static ALCuint pulse_available_samples(ALCdevice *device) //{{{
return RingBufferSize(data->ring);
} //}}}
-static void pulse_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint samples) //{{{
+static ALCenum pulse_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint samples) //{{{
{
pulse_data *data = device->ExtraData;
- if(pulse_available_samples(device) >= samples)
- ReadRingBuffer(data->ring, buffer, samples);
- else
- alcSetError(device, ALC_INVALID_VALUE);
+ if(pulse_available_samples(device) < samples)
+ return ALC_INVALID_VALUE;
+ ReadRingBuffer(data->ring, buffer, samples);
+ return ALC_NO_ERROR;
} //}}}