diff options
author | Joerg Mueller <nexyon@gmail.com> | 2009-08-26 14:02:17 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2009-08-26 14:02:17 +0400 |
commit | adcb21b1f4b079f892e259446bab32c1bc74304f (patch) | |
tree | 6c1efcfe6f1531715db505564d357faf9d80c062 /intern | |
parent | 36b85d4508106752b0595fcb5150fd19f90b8739 (diff) |
Close the old audio device before and not after opening the new.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/audaspace/intern/AUD_C-API.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp index 9481e2139e8..995d4c5f99e 100644 --- a/intern/audaspace/intern/AUD_C-API.cpp +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -77,6 +77,9 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize) #endif AUD_IDevice* dev = NULL; + if(AUD_device) + AUD_exit(); + try { switch(device) @@ -107,9 +110,6 @@ int AUD_init(AUD_DeviceType device, AUD_Specs specs, int buffersize) return false; } - if(AUD_device) - AUD_exit(); - AUD_device = dev; if(AUD_device->checkCapability(AUD_CAPS_3D_DEVICE)) AUD_3ddevice = dynamic_cast<AUD_I3DDevice*>(AUD_device); |