Skip to content

Commit

Permalink
Fix audio destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
gammasoft71 committed Oct 4, 2024
1 parent 7f2ed0e commit 0b8df42
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xtd.core.native.macos/src/xtd/native/macos/console.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 0b8df42

Please sign in to comment.