From 0b8df4275b16bec600c7d42dbef087555d6c26bd Mon Sep 17 00:00:00 2001 From: Gammasoft Date: Fri, 4 Oct 2024 19:56:45 +0200 Subject: [PATCH] Fix audio destructor --- src/xtd.core.native.macos/src/xtd/native/macos/console.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xtd.core.native.macos/src/xtd/native/macos/console.mm b/src/xtd.core.native.macos/src/xtd/native/macos/console.mm index da45323ceba..7d17c80b144 100644 --- a/src/xtd.core.native.macos/src/xtd/native/macos/console.mm +++ b/src/xtd.core.native.macos/src/xtd/native/macos/console.mm @@ -618,8 +618,9 @@ static key_info to_key_info(int32_t key, bool alt) { ~audio() noexcept { if (!initialized) return; - if (AudioOutputUnitStop(audio_unit) != noErr) return; - if (AudioUnitUninitialize(audio_unit) != noErr) return; + // The following method blocks on an internal semaphore when application exit. + //if (AudioOutputUnitStop(audio_unit) != noErr) return; + //if (AudioUnitUninitialize(audio_unit) != noErr) return; } static bool beep(uint32_t frequency, uint32_t duration) {