aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.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/winmm.c
parentf5195ee4f27f4c0bc5ea87dde6638a4a8ad97005 (diff)
Return an ALC error enum from the OpenPlayback backend method
Diffstat (limited to 'Alc/backends/winmm.c')
-rw-r--r--Alc/backends/winmm.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/backends/winmm.c b/Alc/backends/winmm.c
index 445dd51e..cd61a156 100644
--- a/Alc/backends/winmm.c
+++ b/Alc/backends/winmm.c
@@ -292,7 +292,7 @@ static DWORD WINAPI CaptureThreadProc(LPVOID lpParameter)
}
-static ALCboolean WinMMOpenPlayback(ALCdevice *pDevice, const ALCchar *deviceName)
+static ALCenum WinMMOpenPlayback(ALCdevice *pDevice, const ALCchar *deviceName)
{
WAVEFORMATEX wfexFormat;
WinMMData *pData = NULL;
@@ -318,15 +318,12 @@ static ALCboolean WinMMOpenPlayback(ALCdevice *pDevice, const ALCchar *deviceNam
}
}
if(i == NumPlaybackDevices)
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
pData = calloc(1, sizeof(*pData));
if(!pData)
- {
- alcSetError(pDevice, ALC_OUT_OF_MEMORY);
- return ALC_FALSE;
- }
+ return ALC_OUT_OF_MEMORY;
pDevice->ExtraData = pData;
if(pDevice->FmtChans != DevFmtMono)
@@ -381,7 +378,7 @@ static ALCboolean WinMMOpenPlayback(ALCdevice *pDevice, const ALCchar *deviceNam
pDevice->szDeviceName = strdup((lDeviceID==WAVE_MAPPER) ? woDefault :
PlaybackDeviceList[lDeviceID]);
- return ALC_TRUE;
+ return ALC_NO_ERROR;
failure:
if(pData->hWaveThreadEvent)
@@ -392,7 +389,7 @@ failure:
free(pData);
pDevice->ExtraData = NULL;
- return ALC_FALSE;
+ return ALC_INVALID_VALUE;
}
static void WinMMClosePlayback(ALCdevice *device)