Re: Side-chain detection
Re: Side-chain detection
- Subject: Re: Side-chain detection
- From: Stefan Gretscher <email@hidden>
- Date: Wed, 23 Nov 2005 14:26:27 +0100
Am 22.11.2005 um 22:12 schrieb john smith:
No, the bus count is not writeable. Or at least I don't think it is.
The default implementation of BusCountWritable() is returning false for
all scopes, so unless you override this somewhere you should be fine.
Depending on which product it is, it is either
A: Standard template code
or
B: Standard template code with an additional Inputs.SetBusCount(2) in
the constructor.
Is there a reason why you don't directly set the correct bus count in
the c'tor parameter of AUBase instead?
Because if you access the elements in your c'tor to increase their
count, then they most likely have not been created yet via
CreateElements(). As I described below, element creation happens in the
post-c'tor, unless you manually add it in your c'tor.
b) you're trying to access the elements before they have actually
been created by CreateElements().
solution: place the check at some later point, after the elements
have been created (done in the PostConstructor () of AUBase), or call
CreateElements() earlier if you need to do this in your c'tor, like
done in the SDK examples.
I'm doing it in Initialize(), which should be ok from what I can read
here.
Yes it should - for a test, just read the bus count to verify it has
the number you're expecting it to have. Then you'll know whether the
problem is the bus count (as I expect) or something else is wrong.
So, am I to understand that GetInput(1) is supposed to work, and is
the proper way to do it?
This just gets you the input element, you should always get a valid
object here once everything has been created.
As I wrote before, you need to query this object for it's connection
via IsActive():
Once your elements have been created properly, then GetInput() will
return an element that you can query for its connection via
IsActive().
Best,
Stefan
_______________________________________________
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