Prevent CoreAudio driver failing on finish if Dummy driver was selected
This commit is contained in:
parent
12290c172a
commit
5d0622a8de
1 changed files with 35 additions and 32 deletions
|
@ -331,6 +331,7 @@ bool AudioDriverCoreAudio::try_lock() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioDriverCoreAudio::finish() {
|
void AudioDriverCoreAudio::finish() {
|
||||||
|
if (audio_unit) {
|
||||||
OSStatus result;
|
OSStatus result;
|
||||||
|
|
||||||
lock();
|
lock();
|
||||||
|
@ -374,12 +375,13 @@ void AudioDriverCoreAudio::finish() {
|
||||||
}
|
}
|
||||||
|
|
||||||
unlock();
|
unlock();
|
||||||
|
}
|
||||||
|
|
||||||
if (mutex) {
|
if (mutex) {
|
||||||
memdelete(mutex);
|
memdelete(mutex);
|
||||||
mutex = NULL;
|
mutex = NULL;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
Error AudioDriverCoreAudio::capture_start() {
|
Error AudioDriverCoreAudio::capture_start() {
|
||||||
|
|
||||||
|
@ -576,6 +578,7 @@ String AudioDriverCoreAudio::capture_get_device() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
AudioDriverCoreAudio::AudioDriverCoreAudio() {
|
AudioDriverCoreAudio::AudioDriverCoreAudio() {
|
||||||
|
audio_unit = NULL;
|
||||||
active = false;
|
active = false;
|
||||||
mutex = NULL;
|
mutex = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue