diff options
author | Chris Robinson <[email protected]> | 2011-08-24 14:24:48 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-24 14:24:48 -0700 |
commit | c696d4dbb23461066ed741a36a83da10b6ad17f5 (patch) | |
tree | d1b8f683f74d235828f52b2986f84dbee30ef458 /Alc/backends/mmdevapi.c | |
parent | f5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff) |
Return an ALC error enum from the OpenPlayback backend method
Diffstat (limited to 'Alc/backends/mmdevapi.c')
-rw-r--r-- | Alc/backends/mmdevapi.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/backends/mmdevapi.c b/Alc/backends/mmdevapi.c index 702569c6..5fe545a1 100644 --- a/Alc/backends/mmdevapi.c +++ b/Alc/backends/mmdevapi.c @@ -632,7 +632,7 @@ static BOOL MMDevApiLoad(void) } -static ALCboolean MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceName) +static ALCenum MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceName) { MMDevApiData *data = NULL; HRESULT hr; @@ -640,15 +640,12 @@ static ALCboolean MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceN if(!deviceName) deviceName = mmDevice; else if(strcmp(deviceName, mmDevice) != 0) - return ALC_FALSE; + return ALC_INVALID_VALUE; //Initialise requested device data = calloc(1, sizeof(MMDevApiData)); if(!data) - { - alcSetError(device, ALC_OUT_OF_MEMORY); - return ALC_FALSE; - } + return ALC_OUT_OF_MEMORY; device->ExtraData = data; hr = S_OK; @@ -679,11 +676,11 @@ static ALCboolean MMDevApiOpenPlayback(ALCdevice *device, const ALCchar *deviceN device->ExtraData = NULL; ERR("Device init failed: 0x%08lx\n", hr); - return ALC_FALSE; + return ALC_INVALID_VALUE; } device->szDeviceName = strdup(deviceName); - return ALC_TRUE; + return ALC_NO_ERROR; } static void MMDevApiClosePlayback(ALCdevice *device) |