Re: Setting a custom/nongeneric AU property using AudioUnitSetProperty()
Re: Setting a custom/nongeneric AU property using AudioUnitSetProperty()
- Subject: Re: Setting a custom/nongeneric AU property using AudioUnitSetProperty()
- From: "Sophia Poirier [dfx]" <email@hidden>
- Date: Wed, 22 Nov 2006 11:35:51 -0500
Change this:
OSType niOpcode = "NIK0";
to this:
OSType niOpcode = 'NIK\0';
On Nov 22, 2006, at 11:29 AM, Cormac Daly wrote:
Hello,
My application utilizes a specific audio unit to synthesize a MIDI
sequence. The vendor of the audio unit has provided me with an
opcode and a struct which are to be provided to the
AudioUnitSetProperty method so my application can instruct the AU
to load specific files. The opcode in question is NIK\0 - this
appears to be a string, but the vendor informs me that it should be
represented as a four character code in order to pass it to
AudioUnitSetProperty. Some quick googling has informed me that four
character codes are represented on the Mac platform as OSType
datatypes, hence my attempt to pass it in this manner. However, I
am having no luck - although admittedly my attempts so far are a
little flaky:
...
LoadCallStruct loadCallStructInstance = {2, 0, -1, 2,
"multiTest1.nkm", 0};
OSType niOpcode = "NIK0";
ComponentResult loadCallResult;
loadCallResult = AudioUnitSetProperty(outputAU, niOpcode,
kAudioUnitScope_Global, 0, & loadCallStructInstance, sizeof
( loadCallStructInstance));
I have not experienced any errors or warnings but I cannot hear any
results - can anyone shed some light on how I can get this working?
Or on how to tell if the property was set correctly, perhaps by
interpreting loadCallResult?
Thanks,
Cormac
_______________________________________________
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