kMusicDeviceProperty_SoundBankFSSpec
kMusicDeviceProperty_SoundBankFSSpec
- Subject: kMusicDeviceProperty_SoundBankFSSpec
- From: Ruben Zilibowitz <email@hidden>
- Date: Fri, 15 Apr 2011 10:19:52 +1000
I am looking at some code written by someone else, which is now outdated. It no longer works with the latest versions of the Mac OS X frameworks. I am wondering how to bring it up to date so that it does work. What it is supposed to do is take the filename of an SF2 file (SoundFont file) and load it in so it can be played. Here is the full piece of code:
- (BOOL)openFile:(NSString*)filename { FSSpec fsSpec; AudioUnit synthUnit; OSStatus error; int i;
if (![filename makeFSSpec:&fsSpec]) return NO;
AUGraphStop(graph);
AUGraphNodeInfo (graph, synthNode, NULL, &synthUnit); error = AudioUnitSetProperty ( synthUnit, kMusicDeviceProperty_SoundBankFSSpec, kAudioUnitScope_Global, 0, &fsSpec, sizeof (fsSpec) );
AUGraphStart(graph);
if (error) return NO;
for (i = 0; i < 16; i++) channelInstrument[i] = 0;
return YES; }
It would seem that the problem is that AudioUnitSetProperty does not accept kMusicDeviceProperty_SoundBankFSSpec any longer. Can anyone point me in the right direction for fixing this?
Ruben
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden