• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Side-chain input (once again)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Side-chain input (once again)


  • Subject: Re: Side-chain input (once again)
  • From: William Stewart <email@hidden>
  • Date: Tue, 29 Nov 2005 11:52:04 -0800


On 29/11/2005, at 5:12 AM, john smith wrote:


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 :-)

That's because I couldn't find any info regarding error handling. This means that I couldn't be sure that an exception would be thrown in future OS versions.


To rephrase: The only way this is *not* a hack is if GetInput(...) is supposed to throw an exception if the input bus doesn't exist.
If that's the case I would be interested in knowing what kind of exception is thrown, so I can react on it, and pass other exceptions on (throw;)

You can see this in AUBase's implementation of GetInput - there are a couple of different flavours of these so you can decide what you want yourself.



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)

Yup, I figured that out. See other mails from last week (I believe the list was in cc, but I could be wrong).

Yes, saw them after - the subject line was re-titled, so I missed those initially.


Bill



Greets,

Michael Olsen


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:
40apple.com


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
_____________________________________________________________________ ___ __



_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! http:// toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



--
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


References: 
 >Re: Side-chain input (once again) (From: "john smith" <email@hidden>)

  • Prev by Date: Re: File formats and codecs usable with ExtAudioFile API
  • Next by Date: Re: AudioUnit: channel layout
  • Previous by thread: Re: Side-chain input (once again)
  • Next by thread: Re: Channels and frames
  • Index(es):
    • Date
    • Thread