diff options
author | Chris Robinson <[email protected]> | 2012-02-15 20:52:49 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-15 20:52:49 -0800 |
commit | 6b272ff585ee5e4563348e115d3c2b5fe689d2e7 (patch) | |
tree | bd21cabd573789e39b5125e716615c1ee26c1106 /Alc/ALc.c | |
parent | fecd679f33f32280192398e2881f12359b980a8c (diff) |
Add a device parameter to alcLoopbackOpenDeviceSOFT
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -2658,12 +2658,18 @@ ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *pDevice) * * Open a loopback device, for manual rendering. */ -ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(void) +ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(ALCdevice *device) { - ALCdevice *device; - DO_INITCONFIG(); + /* Make sure the device, if specified, belongs to us. */ + if(device && !(device=VerifyDevice(device))) + { + alcSetError(device, ALC_INVALID_DEVICE); + return NULL; + } + if(device) ALCdevice_DecRef(device); + device = calloc(1, sizeof(ALCdevice)); if(!device) { |