Audaspace: port bugfix for CoreAudio from upstream.

Device is now closed for Mac versions where the CoreAudio bug has been
fixed.
This commit is contained in:
Jörg Müller
2025-02-25 18:53:57 +01:00
parent e515f16776
commit 10c7b00f72

View File

@@ -147,6 +147,12 @@ void CoreAudioDevice::open()
void CoreAudioDevice::close()
{
// NOTE: Keep the device open for buggy MacOS versions (see blender issue #121911).
if(!__builtin_available(macOS 15.2, *))
{
return;
}
AudioOutputUnitStop(m_audio_unit);
AudioUnitUninitialize(m_audio_unit);
AudioComponentInstanceDispose(m_audio_unit);
@@ -165,8 +171,7 @@ m_audio_unit(nullptr)
m_specs = specs;
open();
// NOTE: Keep the device open until #121911 is investigated/resolved from Apple side.
// close();
close();
create();
}