aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-02-15 20:52:49 -0800
committerChris Robinson <[email protected]>2012-02-15 20:52:49 -0800
commit6b272ff585ee5e4563348e115d3c2b5fe689d2e7 (patch)
treebd21cabd573789e39b5125e716615c1ee26c1106 /Alc
parentfecd679f33f32280192398e2881f12359b980a8c (diff)
Add a device parameter to alcLoopbackOpenDeviceSOFT
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index e807c408..b399b692 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -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)
{