aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/opensl.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/opensl.c
parentf5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff)
Return an ALC error enum from the OpenPlayback backend method
Diffstat (limited to 'Alc/backends/opensl.c')
-rw-r--r--Alc/backends/opensl.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c
index 88d05505..405f66af 100644
--- a/Alc/backends/opensl.c
+++ b/Alc/backends/opensl.c
@@ -178,7 +178,7 @@ static void opensl_callback(SLAndroidSimpleBufferQueueItf bq, void *context)
}
-static ALCboolean opensl_open_playback(ALCdevice *Device, const ALCchar *deviceName)
+static ALCenum opensl_open_playback(ALCdevice *Device, const ALCchar *deviceName)
{
osl_data *data = NULL;
SLresult result;
@@ -186,14 +186,11 @@ static ALCboolean opensl_open_playback(ALCdevice *Device, const ALCchar *deviceN
if(!deviceName)
deviceName = opensl_device;
else if(strcmp(deviceName, opensl_device) != 0)
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
data = calloc(1, sizeof(*data));
if(!data)
- {
- alcSetError(Device, ALC_OUT_OF_MEMORY);
- return ALC_FALSE;
- }
+ return ALC_OUT_OF_MEMORY;
// create engine
result = slCreateEngine(&data->engineObject, 0, NULL, 0, NULL, NULL);
@@ -231,13 +228,13 @@ static ALCboolean opensl_open_playback(ALCdevice *Device, const ALCchar *deviceN
data->engine = NULL;
free(data);
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
Device->szDeviceName = strdup(deviceName);
Device->ExtraData = data;
- return ALC_TRUE;
+ return ALC_NO_ERROR;
}