aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/portaudio.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-24 14:24:48 -0700
committerChris Robinson <[email protected]>2011-08-24 14:24:48 -0700
commitc696d4dbb23461066ed741a36a83da10b6ad17f5 (patch)
treed1b8f683f74d235828f52b2986f84dbee30ef458 /Alc/backends/portaudio.c
parentf5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff)
Return an ALC error enum from the OpenPlayback backend method
Diffstat (limited to 'Alc/backends/portaudio.c')
-rw-r--r--Alc/backends/portaudio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/backends/portaudio.c b/Alc/backends/portaudio.c
index 4f3dfd5f..606d0633 100644
--- a/Alc/backends/portaudio.c
+++ b/Alc/backends/portaudio.c
@@ -152,7 +152,7 @@ static int pa_capture_cb(const void *inputBuffer, void *outputBuffer,
}
-static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
+static ALCenum pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
{
PaStreamParameters outParams;
pa_data *data;
@@ -161,7 +161,7 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
if(!deviceName)
deviceName = pa_device;
else if(strcmp(deviceName, pa_device) != 0)
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
data = (pa_data*)calloc(1, sizeof(pa_data));
data->update_size = device->UpdateSize;
@@ -204,7 +204,7 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
ERR("Pa_OpenStream() returned an error: %s\n", Pa_GetErrorText(err));
device->ExtraData = NULL;
free(data);
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
device->szDeviceName = strdup(deviceName);
@@ -217,7 +217,7 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
Pa_CloseStream(data->stream);
device->ExtraData = NULL;
free(data);
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
if((device->Flags&DEVICE_CHANNELS_REQUEST))
ERR("Failed to set %s, got %u channels instead\n", DevFmtChannelsString(device->FmtChans), outParams.channelCount);
@@ -225,7 +225,7 @@ static ALCboolean pa_open_playback(ALCdevice *device, const ALCchar *deviceName)
device->FmtChans = ((outParams.channelCount==1) ? DevFmtMono : DevFmtStereo);
}
- return ALC_TRUE;
+ return ALC_NO_ERROR;
}
static void pa_close_playback(ALCdevice *device)