kMusicDeviceProperty_InstrumentCount
kMusicDeviceProperty_InstrumentCount
- Subject: kMusicDeviceProperty_InstrumentCount
- From: Craig Bakalian <email@hidden>
- Date: Thu, 30 Oct 2003 09:50:31 -0500
Hi,
I know this code isn't working. I am getting a -50 on there err. I
am sure this type of question has been answered before but, how does
one get the instrument count of Apple's DLSSynth?
ComponentDescription synth;
synth.componentFlags = 0;
synth.componentFlagsMask = 0;
synth.componentType = kAudioUnitType_MusicDevice;
synth.componentSubType = kAudioUnitSubType_DLSSynth;
synth.componentManufacturer = kAudioUnitManufacturer_Apple;
AUNode synthNode;
AUGraphNewNode(graph, &synth, 0, NULL, &synthNode);
the above is popped first into a AUGraph called graph.
I am using this code to get the instrument count with a -50.
-(NSArray *)instrumentArray
{
AUNode synthNode;
AudioUnit theSynth;
UInt32 count =0;
UInt32 size = 0;
OSStatus err;
AUGraphGetIndNode(graph, 0, &synthNode);
err = AUGraphGetNodeInfo(graph, synthNode, NULL, NULL, NULL,
&theSynth);
err = AudioUnitGetProperty(theSynth,
kMusicDeviceProperty_InstrumentCount, kAudioUnitScope_Output, 2,
&count, &size);
NSLog(@"%d", err);
return blahblah...
}
Craig Bakalian
www.eThinkingCap.com
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.