diff options
author | Chris Robinson <[email protected]> | 2012-03-01 08:30:21 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-03-01 08:30:21 -0800 |
commit | 50ef19720d5e1f30e9e87b1ca9ab165eb6dcbc34 (patch) | |
tree | 617142f3e51398066db11a021ace4a0c334cd7f0 /Alc/ALc.c | |
parent | db4d62d17c71394e9b3bbb8e042820bf250a87dc (diff) |
Make alcLoopbackOpenDeviceSOFT take a standard "device" name for a parameter
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -2674,17 +2674,18 @@ ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *pDevice) * * Open a loopback device, for manual rendering. */ -ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(ALCdevice *device) +ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName) { + ALCdevice *device; + DO_INITCONFIG(); - /* Make sure the device, if specified, belongs to us. */ - if(device && !(device=VerifyDevice(device))) + /* Make sure the device name, if specified, is us. */ + if(deviceName && strcmp(deviceName, alcDefaultName) != 0) { - alcSetError(device, ALC_INVALID_DEVICE); + alcSetError(NULL, ALC_INVALID_VALUE); return NULL; } - if(device) ALCdevice_DecRef(device); device = calloc(1, sizeof(ALCdevice)); if(!device) |