Merge pull request #21407 from marcelofg55/coreaudio_dfix
Prevent CoreAudio driver failing on finish if Dummy driver was selected
This commit is contained in:
commit
653b4829f1
1 changed files with 35 additions and 32 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue