From 0f5dd7cd99587f8f3442e615bf948851743b6710 Mon Sep 17 00:00:00 2001 From: Donovan Watteau Date: Tue, 17 May 2022 23:56:49 +0200 Subject: [PATCH] MACOS: Drop macOS 10.2-10.3 CoreAudio support There's still code for macOS 10.4 in the codebase, but everything before that has probably been KO for years. And no C++11 toolchain exists for macOS < 10.4 either. --- backends/midi/coreaudio.cpp | 39 ++++++------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 0ee3dff4c17..13a51dd9c0c 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -209,40 +209,13 @@ void MidiDriver_CORE::loadSoundFont(const char *soundfont) { FSRef fsref; err = FSPathMakeRef((const byte *)soundfont, &fsref, NULL); - SInt32 version; - err = Gestalt(gestaltSystemVersion, &version); - if (err == noErr) { - if (version >= 0x1030) { - // Use kMusicDeviceProperty_SoundBankFSRef in >= 10.3 - - // HACK HACK HACK HACK SUPER HACK: Using the value of 1012 instead of - // kMusicDeviceProperty_SoundBankFSRef so this compiles with the 10.2 - // SDK (which does not have that symbol). - if (err == noErr) { - err = AudioUnitSetProperty( - _synth, - /*kMusicDeviceProperty_SoundBankFSRef*/ 1012, kAudioUnitScope_Global, - 0, - &fsref, sizeof(fsref) - ); - } - } else { - // In 10.2, only kMusicDeviceProperty_SoundBankFSSpec is available - FSSpec fsSpec; - - if (err == noErr) - err = FSGetCatalogInfo(&fsref, kFSCatInfoNone, NULL, NULL, &fsSpec, NULL); - - if (err == noErr) { - err = AudioUnitSetProperty( - _synth, - kMusicDeviceProperty_SoundBankFSSpec, kAudioUnitScope_Global, - 0, - &fsSpec, sizeof(fsSpec) - ); - } - } + err = AudioUnitSetProperty( + _synth, + kMusicDeviceProperty_SoundBankFSRef, kAudioUnitScope_Global, + 0, + &fsref, sizeof(fsref) + ); } #else // kMusicDeviceProperty_SoundBankURL was added in 10.5 as a replacement