diff options
author | Max Horn | 2008-03-12 18:38:03 +0000 |
---|---|---|
committer | Max Horn | 2008-03-12 18:38:03 +0000 |
commit | b434f189bce98626dbe31539bb8d907e67d5ca99 (patch) | |
tree | 5f577ffaa9bb81d6fee85a2bfa2ee115e7a66501 /backends | |
parent | 6b3b7a5dc21f90608874d6619a46e554760e3e0e (diff) | |
download | scummvm-rg350-b434f189bce98626dbe31539bb8d907e67d5ca99.tar.gz scummvm-rg350-b434f189bce98626dbe31539bb8d907e67d5ca99.tar.bz2 scummvm-rg350-b434f189bce98626dbe31539bb8d907e67d5ca99.zip |
Switched CoreAudio MIDI driver to use AudioUnit v2 API (results in better Leopard support/performance, it seems, at least in Exult)
svn-id: r31113
Diffstat (limited to 'backends')
-rw-r--r-- | backends/midi/coreaudio.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 54777f6c69..c338678036 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -76,25 +76,23 @@ int MidiDriver_CORE::open() { return MERR_ALREADY_OPEN; // Open the Music Device. - // We use the AudioUnit v1 API, even though it is deprecated, because - // this way we stay compatible with older OS X versions. - // For v2, we'd use kAudioUnitType_MusicDevice and kAudioUnitSubType_DLSSynth RequireNoErr(NewAUGraph(&_auGraph)); AUNode outputNode, synthNode; ComponentDescription desc; // The default output device - desc.componentType = kAudioUnitComponentType; - desc.componentSubType = kAudioUnitSubType_Output; - desc.componentManufacturer = kAudioUnitID_DefaultOutput; + desc.componentType = kAudioUnitType_Output; + desc.componentSubType = kAudioUnitSubType_DefaultOutput; + desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; RequireNoErr(AUGraphNewNode(_auGraph, &desc, 0, NULL, &outputNode)); // The built-in default (softsynth) music device - desc.componentSubType = kAudioUnitSubType_MusicDevice; - desc.componentManufacturer = kAudioUnitID_DLSSynth; + desc.componentType = kAudioUnitType_MusicDevice; + desc.componentSubType = kAudioUnitSubType_DLSSynth; + desc.componentManufacturer = kAudioUnitManufacturer_Apple; RequireNoErr(AUGraphNewNode(_auGraph, &desc, 0, NULL, &synthNode)); // Connect the softsynth to the default output |