Re: Quick question on configuring an AU for a certain channel config
Re: Quick question on configuring an AU for a certain channel config
- Subject: Re: Quick question on configuring an AU for a certain channel config
- From: William Stewart <email@hidden>
- Date: Fri, 21 Dec 2007 11:56:23 -0800
Hi Bernd
On Dec 21, 2007, at 12:40 AM, Bernd Burhoff wrote:
Bill, you are perfectly right!
This not the way it should be done and I do not recommend to use
this because indeed there is no guarantee that logic behaves like
this every time. As I wrote: it's just what I found out emprically
(for my own non-commercial AU).
But how can I know if there is a connection, when HasInput() is
always true ?
You can't - if HasInput returns true, then that means that Logic has
instantiated an input callback to you for that input and thus you
should call it and process the data.
If it really hasn't got an input (and thus it isn't going to give you
correct data if you call it), then that is a bug in Logic and needs to
be fixed (I would think sooner than later). There is no reliable way
for an AU to tell the difference.
If you have found empirically, and I think Stefan should confirm this,
that Logic is indeed doing this incorrectly (and the way you
describe), then you should:
(1) Condiditionalise your code to only do this for Logic and for the
versions where it does this incorrectly
(2) Deactivate that condition for any other app or version of Logic
where that condition is not true.
However, the Logic guys should confirm these details before you start
putting this workaround in your code. (In general we discourage the
idea of audio units doing workarounds, but it seems to be unavoidable).
Also, please file a bug report - http://bugreporter.apple.com
That's probably the best way to track this issue.
Thanks
Bill
ps We added a property to the AU Spec for a reliable way for hosts to
tell AUs which version, etc, that they are running under.
kAudioUnitProperty_AUHostIdentifier (details are in the Leopard header
<AudioUnit/AudioUnitProperties.h> Hopefully, logic is setting this. If
not, they will need to tell you how to identify Logic as the host app.
2007/12/20, Bernd Burhoff <email@hidden>:
Hi tahome,
the pointer thing is something that I found out while testing
around the
same problem with HasInput() (that it always returned TRUE).
It still looks strange to me, but in my case it worked, so I used
it. Just a
workaround.
This way did not work with AudioBufferLists in my AU.
I use GetChannelData() instead of the GetBufferList().
Bernd
Am 20.12.2007 um 14:07 schrieb tahome izwah:
Bill and Bernd, thank you! It looks indeed like a bug in Logic 8 to
me.
Bernd, I tried something similar to what you are suggesting, like
comparing the pointer to the audio data in the ABLs that I get from
the side chain and the main input (ie sideChainAbl->mBuffer[0].mData
!= inputAbl->mBuffer[0].mData). They appear to be different so
there's
no telling if the sidechain is connected or not. I did not use
GetChannelData(), however, I might give this a try, even though I'm
not sure what difference it would make (it should point to the same
data, right?).
I am curious - how do you know the two pointers have to be the same
in
Logic if the sidechain is not connected? Ie. what is the logic behind
this - is this just something you discovered empirically or is this
documented somewhere? Is it guaranteed to work? I mean, Logic could
as
well use some pre-set buffer containing silence for an unconnected
sidechain, couldn't it?
Thanks again,
--th
_______________________________________________
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