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 19:16:42 -0800
On 20/03/2006, at 7:07 PM, john wrote:
Hi Bill,
On the other hand, I have always used the correct code you have
below and I get a crash on the call the setShowsExpertParameters
with the F8 audiounit.
I would love a radar - http://bugreporter.apple.com
Thanks!
Bill
-- John
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
--
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