aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r--Alc/backends/alsa.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index d953f52f..6d4528c1 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -979,6 +979,13 @@ static void alsa_stop_capture(ALCdevice *Device)
data->doCapture = AL_FALSE;
}
+static ALCenum alsa_capture_samples(ALCdevice *Device, ALCvoid *Buffer, ALCuint Samples)
+{
+ alsa_data *data = (alsa_data*)Device->ExtraData;
+ ReadRingBuffer(data->ring, Buffer, Samples);
+ return ALC_NO_ERROR;
+}
+
static ALCuint alsa_available_samples(ALCdevice *Device)
{
alsa_data *data = (alsa_data*)Device->ExtraData;
@@ -1040,16 +1047,6 @@ static ALCuint alsa_available_samples(ALCdevice *Device)
return RingBufferSize(data->ring);
}
-static ALCenum alsa_capture_samples(ALCdevice *Device, ALCvoid *Buffer, ALCuint Samples)
-{
- alsa_data *data = (alsa_data*)Device->ExtraData;
-
- if(alsa_available_samples(Device) < Samples)
- return ALC_INVALID_VALUE;
- ReadRingBuffer(data->ring, Buffer, Samples);
- return ALC_NO_ERROR;
-}
-
static const BackendFuncs alsa_funcs = {
alsa_open_playback,