The current code checked for the CPU type to determine if we were
building for the older macOS releases requiring this older API, but
we can just check MAC_OS_X_VERSION_MAX_ALLOWED which is clearer and
more accurate.
Apart from simplification, this also lets one build ScummVM for x86
again on Tiger. I haven't checked this case, though :)
Note that the ComponentDescription -> AudioComponentDescription change
was done in macOS 10.6 and not macOS 10.5, so this also fixes this
case.
Tested on macOS 10.4, 10.5, 10.5 with the 10.4 SDK, and on 12.6.
Mark MidiDriver_Sndio and MidiDriver_ALSA overridden methods
with override.
Removes compile warnings:
`overrides a member function but is not marked 'override'`
when building with clang.
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.
Apple's desktop operating system was formerly called "Mac OS X" and "OS X", but since 2016 it has been called "macOS" (starting with version 10.12).
Changing across all comments and documentation to use this current terminology, except in cases where the historical versions are explicitly referenced. No code changes are made; we should consider changing those in future PRs.
Also remove a couple of TODOs. I think we can limit the CoreAudio
plugin to the Apple DLS softsynth since with have the CoreMidi
plugin to access other MIDI devices.
This is a pretty bad hack of not using the kMusicDeviceProperty_SoundBankFSRef symbol and using its value instead. It felt wrong breaking 10.2.8 support just because of Soundfonts.
This should fix the issue mentioned here: http://forums.scummvm.org/viewtopic.php?t=11255
Apparently Windows doesn't generate unique names for MIDI devices of the exact same type.
I do not know whether this could be a problem on other backends, too.
The new API has been present since Mac OS X 10.5 (released four years ago,
in October 2007), and also since iOS 2.0 (thus, the iOS port may be able to
use it, too). Moreover, 10.5 was the last system to support PowerPC.
This silences a bunch of deprecation warnings when compiling on any current
system. Moreover, the new API is available on the iPhone, so perhaps this
is interesting for the iPhone port, too.
On the long run, ScummVM will have to switch to the new API, as Apple
will eventually drop the old one.