diff options
Diffstat (limited to 'intern/audaspace')
-rw-r--r-- | intern/audaspace/intern/AUD_C-API.cpp | 10 | ||||
-rw-r--r-- | intern/audaspace/intern/AUD_C-API.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp index 48a3c7b2ded..2d9a8e0ebc8 100644 --- a/intern/audaspace/intern/AUD_C-API.cpp +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -814,10 +814,9 @@ int AUD_Device_read(AUD_Device *device, data_t *buffer, int length) void AUD_Device_free(AUD_Device *device) { - assert(device); - try { - delete device; + if(device != &AUD_device) + delete device; } catch(AUD_Exception&) { @@ -1347,6 +1346,11 @@ AUD_Device *AUD_openMixdownDevice(AUD_DeviceSpecs specs, AUD_Sound *sequencer, f } } +AUD_Device *AUD_Device_getCurrent(void) +{ + return &AUD_device; +} + int AUD_isJackSupported(void) { #ifdef WITH_JACK diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h index f53dfcefedd..bdbe751b140 100644 --- a/intern/audaspace/intern/AUD_C-API.h +++ b/intern/audaspace/intern/AUD_C-API.h @@ -811,6 +811,8 @@ extern void *AUD_getPythonSound(AUD_Sound *sound); extern AUD_Sound *AUD_getSoundFromPython(void *sound); #endif +extern AUD_Device *AUD_Device_getCurrent(void); + extern int AUD_isJackSupported(void); #ifdef __cplusplus |