[Scummvm-cvs-logs] SF.net SVN: scummvm: [31113] scummvm/trunk/backends/midi/coreaudio.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Wed Mar 12 19:38:04 CET 2008


Revision: 31113
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31113&view=rev
Author:   fingolfin
Date:     2008-03-12 11:38:03 -0700 (Wed, 12 Mar 2008)

Log Message:
-----------
Switched CoreAudio MIDI driver to use AudioUnit v2 API (results in better Leopard support/performance, it seems, at least in Exult)

Modified Paths:
--------------
    scummvm/trunk/backends/midi/coreaudio.cpp

Modified: scummvm/trunk/backends/midi/coreaudio.cpp
===================================================================
--- scummvm/trunk/backends/midi/coreaudio.cpp	2008-03-12 18:36:51 UTC (rev 31112)
+++ scummvm/trunk/backends/midi/coreaudio.cpp	2008-03-12 18:38:03 UTC (rev 31113)
@@ -76,25 +76,23 @@
 		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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list