Re: Side-chain input (once again)
Re: Side-chain input (once again)
- Subject: Re: Side-chain input (once again)
- From: William Stewart <email@hidden>
- Date: Mon, 28 Nov 2005 18:40:59 -0800
There are two tests you have to do here:
(1) Is there an element at the index you are asking - so if you are
requesting an element that hasn't been created, the AUBase
implementation throws an exception.
(2) If the element exists, does it have input?
This would be the first time that I've seen exceptions being thrown
correctly (and the code correctly doing a try/catch) referred to as a
hack :-)
One way you could avoid the try/catch is to check the number of input
elements - so if you have only a single input element, you would
never do GetInput(1)
Bill
On 20/11/2005, at 12:50 AM, john smith wrote:
Hi,
Some of our products has a side-chain input, i.e. 2 input busses.
The question is, how do I detect if the host if using the second bus?
I tried:
if (GetInput(1)) {
DoMySideChainPreparationStuffHere();
}
but I seem to crash inside GetInput(1) if no second bus is present.
FWIW, I'm using AULab for testing.
The following seems to work:
try {
if (GetInput(1)) {
DoMySideChainPreparationStuffHere();
}
}
catch(...) {
}
but honestly... that's seems like too big a hack, even for me.
Any clues?
Thanks,
Michael Olsen
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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