• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kMusicDeviceProperty_InstrumentCount
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kMusicDeviceProperty_InstrumentCount


  • Subject: Re: kMusicDeviceProperty_InstrumentCount
  • From: Jeremy Sagan <email@hidden>
  • Date: Thu, 30 Oct 2003 14:06:03 -0500

On Thursday, October 30, 2003, at 09:50 AM, Craig Bakalian wrote:

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;

Just a hunch but your size parameter looks like it is 0. There is not much data you can put into count if the size of count is zero.

Jeremy


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.
_______________________________________________
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.

References: 
 >kMusicDeviceProperty_InstrumentCount (From: Craig Bakalian <email@hidden>)

  • Prev by Date: Re: kMusicDeviceProperty_InstrumentCount
  • Next by Date: Re: kMusicDeviceProperty_InstrumentCount
  • Previous by thread: Re: kMusicDeviceProperty_InstrumentCount
  • Next by thread: Re: kMusicDeviceProperty_InstrumentCount
  • Index(es):
    • Date
    • Thread