forked from bartvdbraak/blender
Close the old audio device before and not after opening the new.
This commit is contained in:
parent
36b85d4508
commit
adcb21b1f4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user