aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/alsa.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-24 14:44:15 -0700
committerChris Robinson <[email protected]>2011-08-24 14:44:15 -0700
commit7e2155d937e66dc7c4a1445bf12e64684eebb5a0 (patch)
tree4af5b1cc0f824b60e30be1d1d9cfed9216d8ac7a /Alc/backends/alsa.c
parentc696d4dbb23461066ed741a36a83da10b6ad17f5 (diff)
Return an ALC error enum from the OpenCapture backend method
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r--Alc/backends/alsa.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index fc873489..838f464c 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -799,7 +799,7 @@ static void alsa_stop_playback(ALCdevice *device)
}
-static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName)
+static ALCenum alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceName)
{
snd_pcm_hw_params_t *p;
snd_pcm_uframes_t bufferSizeInFrames;
@@ -834,7 +834,7 @@ static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceNam
}
}
if(idx == numCaptureDevNames)
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
data = (alsa_data*)calloc(1, sizeof(alsa_data));
@@ -844,7 +844,7 @@ static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceNam
{
ERR("Could not open capture device '%s': %s\n", driver, snd_strerror(i));
free(data);
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
format = -1;
@@ -927,7 +927,7 @@ static ALCboolean alsa_open_capture(ALCdevice *pDevice, const ALCchar *deviceNam
pDevice->szDeviceName = strdup(deviceName);
pDevice->ExtraData = data;
- return ALC_TRUE;
+ return ALC_NO_ERROR;
error:
free(data->buffer);
@@ -936,7 +936,7 @@ error:
free(data);
pDevice->ExtraData = NULL;
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
static void alsa_close_capture(ALCdevice *pDevice)