aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/dsound.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/dsound.c
parentf5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff)
Return an ALC error enum from the OpenPlayback backend method
Diffstat (limited to 'Alc/backends/dsound.c')
-rw-r--r--Alc/backends/dsound.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/backends/dsound.c b/Alc/backends/dsound.c
index 8a8ce3bc..2b944adc 100644
--- a/Alc/backends/dsound.c
+++ b/Alc/backends/dsound.c
@@ -254,7 +254,7 @@ static ALuint DSoundProc(ALvoid *ptr)
return 0;
}
-static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceName)
+static ALCenum DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceName)
{
DSoundData *pData = NULL;
LPGUID guid = NULL;
@@ -282,16 +282,13 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
}
}
if(i == NumDevices)
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
//Initialise requested device
pData = calloc(1, sizeof(DSoundData));
if(!pData)
- {
- alcSetError(device, ALC_OUT_OF_MEMORY);
- return ALC_FALSE;
- }
+ return ALC_OUT_OF_MEMORY;
hr = DS_OK;
pData->hNotifyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
@@ -311,12 +308,12 @@ static ALCboolean DSoundOpenPlayback(ALCdevice *device, const ALCchar *deviceNam
CloseHandle(pData->hNotifyEvent);
free(pData);
ERR("Device init failed: 0x%08lx\n", hr);
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
device->szDeviceName = strdup(deviceName);
device->ExtraData = pData;
- return ALC_TRUE;
+ return ALC_NO_ERROR;
}
static void DSoundClosePlayback(ALCdevice *device)