Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting a custom/nongeneric AU property using AudioUnitSetProperty()



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: http://lists.apple.com/mailman/options/coreaudio-api/email@hidden

This email sent to email@hidden
References: 
 >Setting a custom/nongeneric AU property using AudioUnitSetProperty() (From: Cormac Daly <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.