Re: Some AudioUnits crash WhackedTV sample code
Re: Some AudioUnits crash WhackedTV sample code
- Subject: Re: Some AudioUnits crash WhackedTV sample code
- From: William Stewart <email@hidden>
- Date: Mon, 20 Mar 2006 18:51:37 -0800
Robert,
I've reproduced the crash by making the following change in AULab:
Originally it is like this:
AUGenericView *viewToShow = [[[AUGenericView alloc]
initWithAudioUnit:mCurrentAU] autorelease];
Now, I change it to this:
AUGenericView *viewToShow = [[AUGenericView alloc] autorelease];
[viewToShow setShowsExpertParameters: YES];
[viewToShow initWithAudioUnit:mCurrentAU];
And I get a crash - with ANY AU - yours, Apple's, etc. The reason
being, that I am calling a method on the object BEFORE I have called
the init... method - so the setShows... method is expecting state to
be initialised that isn't until the init method is called.
I think the Cocoa convention is such that init methods should be
called before any other instance method. We can probably make the
generic view more robust here, but I don't think that is the primary
culprit.
If I change the code to do this:
AUGenericView *viewToShow = [[[AUGenericView alloc]
initWithAudioUnit:mCurrentAU] autorelease];
[viewToShow setShowsExpertParameters: YES];
Then everything is also fine...
If you make that change in the whacked TV code - then it should also
be fine. I'll send the bug over to the QT team.
Thanks
Bill
On 20/03/2006, at 3:46 PM, William Stewart wrote:
Robert,
Expert params are quite simple.
There is a flag that an AU can set, that says whether a parameter
is an expert param or not. The intention is that the user should be
very, very familiar with the AU's operation before they start to
manipulate expert params. (For an example of this, have a look at
AUTimePitch in AULab).
Most hosts I think do the same as the Carbon generic view - they do
not display expert params. When we did the Cocoa AU, we decided we
would add a disclosure button to the UI, so that if the AU has
expert params, this button becomes visible and the user can reveal
the AU's expert params. (If the AU doesn't report any expert
params, then you'd never see this button).
Now, I don't know why this crashes in the whacked TV code. I
suspect that it could be an order of operations problem and
something wrong with the Cocoa View - but the fact that it doesn't
crash with any Apple AU's makes me suspect that this is your AU.
I'm going to look at this myself some more. Perhaps it would be
good if you could send me a build of your AU so I can have a look
at it with that AU as well as our own.
Thanks
Bill
ps, I've cc'd Brad Ford - he I think, is the person on the QT team
who would know most about this - perhaps he has something to add to
that code's usage of this API....
On 20/03/2006, at 1:52 PM, Robert Abernathy wrote:
Bill,
The only AU that I currently have on my system that crashes
WhackedTV is my own. All of the Apple AU's work fine (including
FilterDemo - so, It doesn't appear to be a Cocoa UI problem).
I'd like to try to look into this further. But, I think I need to
know more about the expert parameters and I can't find the docs
(Google has failed me). Where should I look? If I can get a bit
more info on this, I hope to put together a small test case. F8
has a few too many parameters to be useful for anything small.
Rob
On 20 Mar 2006, at 20:58, William Stewart wrote:
OK - could you file a radar report and I'll have a look at this
in some more detail (http://bugreporter.apple.com)
one other piece of information that would be useful - if you were
to try this with say one of Apple's AUs (like AUBandpass,
AUMatrixReverb, AUMulitbandCompressor) that don't have any expert
params, does it still crash?
Thanks
Bill
On 17/03/2006, at 4:35 PM, john wrote:
Hi Bill,
I see that, in my code, if I remove the
setShowsExpertParameters: call the F8 AU displays ok, like in
AULab. However, the iZotope Vinyl AU does not display properly,
and also crashes AULab when selecting the generic view.
The F8 and Vinyl AU's pass validation, but the DestroyFX
transverb does not.
-- John
This code is provided by people in the QT Group - you might
want to ask them (QT API)
You can also validate the AUs you are using - run the auval
tool on these. If these AUs pass or fail validation would be
interesting to know.
You can also host these AUs in the AU Lab application (/
Developer/Applications/Audio/) - you can bring up either their
custom or show their generic views. If the AUs have expert
parameters, then you'll see a disclosure triangle that when
expanded, will show the expert params. (Oh, expert params are
params that are marked with the "expert" flag - so they should
not normally be presented to users)
Bill
I looked at this a bit with F8. The crash with F8 occurs at
line 1898 of SGAudioSettings.mm "[auview
setShowsExpertParameters:YES];"
What does setShowsExpertParameters turn on? If I comment out
this line and then load F8, it doesn't crash. But, the
GenericView shows a random subset of the F8 parameters when it
is loaded.
If someone can point me at documentation for AUGenericView,
perhaps I can figure out what parameter information F8 is
providing that is instigating the crash.
Rob
--
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
____________________________________________________________________
______
--
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
--
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