Re: AudioUnit - CarbonView - Toggling BevelButton
Re: AudioUnit - CarbonView - Toggling BevelButton
- Subject: Re: AudioUnit - CarbonView - Toggling BevelButton
- From: Luke Bellandi <email@hidden>
- Date: Tue, 17 May 2005 16:21:13 -0700
Hi Mark,On May 17, 2005, at 4:08 PM, mark erickson wrote: Luke, Thanks for the rapid response. You are right - I'm not calling SetParameter()... Sliders seem to get tracked automatically, as do text boxes. I don't see where to handle a button press.
Sliders and Text boxes are created and registered for event handling via static methods in the AUControlGroup class (declared in AUPublic/AUCarbonViewBase/AUControlGroup.h) You can create a function similar in style to those that already exist to get the toggle button behavior you want.
However, it seems like a checkbox would provide the same functionality you're looking to get out of a toggle button. Is there a reason you need a toggle button over a checkbox?
Best, Luke Thanks again. Mark
On May 17, 2005, at 5:47 PM, Luke Bellandi wrote:
Hi Mark,
On May 17, 2005, at 2:59 PM, mark erickson wrote:
I'm trying to make an AU plug-in using the newest carbon view template for Xcode provided by apple.
I can get sliders and check boxes to work, but I can't seem to get a bevel button that toggles working. It draws fine and seems to track mouse clicks fine. I've tried both defining the outParameterInfo.unit for this button as both kAudioUnitParameterUnit_Boolean and kAudioUnitParameterUnit_Indexed but neither seem to work. Additionally, outParameterInfo.minValue = 0 and outParameterInfo.maxValue = 1.
In use, GetParameter( kParam_One ) always returns 0, never 1.
Is it possible to use a bevelbutton in a toggled, boolean state like this? If so, what am I doing wrong?
It's surely possible.
Are you calling SetParameter (...) as appropriate when the button is pressed? [e.g., SetParameter (kParam_One, 1 - GetParameter(kParam_One)) ] That could be the problem here.
Best, Luke
|
_______________________________________________
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