Re: How to set correctly available I/O in an Audio Unit
Re: How to set correctly available I/O in an Audio Unit
- Subject: Re: How to set correctly available I/O in an Audio Unit
- From: William Stewart <email@hidden>
- Date: Wed, 18 Nov 2009 16:43:43 -0800
Have a look in AUBase and ComonentBase - there is a description method:
/*! @method GetComponentDescription */
AudioComponentDescription GetComponentDescription() const;
This returns an AudioComponentDescription, but it is compatible to run on Tiger (you build on SnowLeopard, but you set your deployment target to 10.4)
Bill
On Nov 18, 2009, at 12:13 AM, Kevin Molcard wrote:
> I just notice that the GetComponentDescription method and AudioComponentDescription struct are available on iPhone SDK but I don't target on iPhone.
> My targets are Mac OSX 10.4 and later.
> I found the ComponentDescription struc and GetComponentInfo method that seem to give me what I want.
> The problem is I don't know how to call it (especially how to get the first arg).
>
> Kevin
>
> William Stewart a écrit :
>> With the AU spec currently you can't achieve this - we explored this kind of notion - of an AU providing a set of I/O configurations, but the proposal didn't gain much support (personally, I thought it was worth considering).
>>
>> In any case... you could do one of a couple of things:
>>
>> (1) you really have two configurations you want to support, (taking the stereo out as given) - all mono or all stereo.
>>
>> These could be two AUs - neither AU supports the SupportedNumChannels property (or have the element count changeable), so for an instrument the implication is that the initial config is the only config
>> MonoOutSynth
>> - it starts life with 17 output buses (1 stereo, 16 mono)
>> StereoOutSynth - it starts life with 17 output buses (1 stereo, 16 stereo)
>>
>> I'd see the 1 stereo output as just something to manage in the UI in either of the above two cases. You can (we do this with a few of our AUs) manage this quite simply with the AU implementation - you just make two AUs out of it (you can use the same export symbol, etc, all you have to do is add an additional entry in the .r file). In the constructor you can know whether you are being opened as the mono or stereo version (just check the subtype), so you configure the output buses to match that. It should be pretty straight forward
>>
>> For instance (these are your 2 .r entries - same entry point, give them different names ;) )
>> aumd, Mono, Acme
>> aumd, Stro, Acme
>>
>> Then in your constructor, call:
>> AudioComponentDescription desc = GetComponentDescription();
>> the desc.componentSubType will be either Mono or Stro - so you set up this
>>
>> (2) Otherwise, you would do something like:
>> SupportedNumChannels
>> {0, 1}, {0, 2}
>> Set element count to 17 and not writable
>>
>> This means however, that the host can configure you to have any output with either mono or stereo (so, its not really what you want, but might be manageable). The user can certainly create the config you desire, but I think the two different AUs is probably the better approach.
>>
>> Bill
>>
>> On Nov 10, 2009, at 9:01 AM, Kevin Molcard wrote:
>>
>>> Hi all,
>>> I am sorry because this subject is has been already discussed but I didn't find any solution to my problem.
>>> I want to have 3 configurations:
>>> 0 in - 1 stereo out
>>> 0 in - 1 stereo out + 16 mono out
>>> 0 in - 1 stereo out + 16 stereo out
>>>
>>>
>>> What do I have to do to acheive this?
>>>
>>> I think I need 17 buses then I have to set my buses stereo or mono. But I don't know how to do this dynamically.
>>>
>>> I know I also need to overload the */SupportedNumChannels/* method.
>>>
>>> Thanks in advance
>>>
>>>
>>>
>>> --
>>> Kevin Molcard
>>> _______________________________________________
>>> 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
>>
>>
>
> --
> Kevin Molcard
> Sofware Engineer
>
> ARTURIA
> 4 chemin de Malacher
> 38240 Meylan - France
> Tel: +33 438 020 555
> Fax: +33 438 020 525
>
> http://www.arturia.com
>
_______________________________________________
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