Merge pull request #21407 from marcelofg55/coreaudio_dfix

Prevent CoreAudio driver failing on finish if Dummy driver was selected
This commit is contained in:
Rémi Verschelde 2018-08-26 16:30:57 +02:00 committed by GitHub
commit 653b4829f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -331,6 +331,7 @@ bool AudioDriverCoreAudio::try_lock() {
}
void AudioDriverCoreAudio::finish() {
if (audio_unit) {
OSStatus result;
lock();
@ -374,12 +375,13 @@ void AudioDriverCoreAudio::finish() {
}
unlock();
}
if (mutex) {
memdelete(mutex);
mutex = NULL;
}
};
}
Error AudioDriverCoreAudio::capture_start() {
@ -576,6 +578,7 @@ String AudioDriverCoreAudio::capture_get_device() {
#endif
AudioDriverCoreAudio::AudioDriverCoreAudio() {
audio_unit = NULL;
active = false;
mutex = NULL;