• 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 detection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Side-chain detection


  • Subject: Re: Side-chain detection
  • From: Stefan Gretscher <email@hidden>
  • Date: Tue, 22 Nov 2005 21:03:31 +0100

Hi Michael,

Am 22.11.2005 um 08:56 schrieb john smith:
what can I do to check if a second input bus has been activated(*)?
Bill described this in a posting named "Bus Count and Usage" dated Nov 8th, following up the discussion about the matter.

I'm trying to detect whether the host is using a potential second input bus in my plug-ins. I tried GetInput(1), assuming it would return 0 if no such second bus was present, but it crashes the plug-in (or, if in the compiler, hangs).
By the description of your crash I'd guess that the second input bus has not yet been created when you're trying to access it, which could have 2 reasons:

a) you're using a writable input bus count and it's still set to 1
solution: I'd assume that your AU can't handle more than 2 input busses, so you shouldn't have a writable input bus count in first place - use a fixed input bus count of 2 instead.


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.


It should probably be noted that I'd prefer to do this check in Initialize() (if possible).
Once your elements have been created properly, then GetInput() will return an element that you can query for its connection via IsActive().
This can be done in your implementation of Initialize().


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


  • Follow-Ups:
    • Re: Side-chain detection
      • From: "john smith" <email@hidden>
References: 
 >Side-chain detection (From: "john smith" <email@hidden>)

  • Prev by Date: convertInputSamples/clipOutputSamples
  • Next by Date: Re: Side-chain detection
  • Previous by thread: Side-chain detection
  • Next by thread: Re: Side-chain detection
  • Index(es):
    • Date
    • Thread