mirror of
https://github.com/godotengine/godot
synced 2024-09-05 12:08:28 +00:00
Prevent CoreAudio driver failing on finish if Dummy driver was selected
This commit is contained in:
parent
12290c172a
commit
5d0622a8de
|
@ -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