Let me rephrase my question :)

Basically I want to have a simple push button on an AudioUnit's view. So I
created a Cocoa view, placed an NSButton on it, put the view in a bundle,
and returning its factory when the host requests the
kAudioUnitProperty_CocoaUI property. So far so good - The Audio unit loads,
the view displays.

In my AudioUnit's GetParameterInfo, I am returning the following for my
button:

case kMyButtonAction:

                    AUBase::FillInParameterName (outParameterInfo, CFSTR("My
Button"), false);

                    outParameterInfo.unit = kAudioUnitParameterUnit_Boolean;

                    outParameterInfo.minValue = 0;

                    outParameterInfo.maxValue = 1;

                    outParameterInfo.defaultValue = 0;

                    outParameterInfo.flags =
kAudioUnitParameterFlag_IsWritable;

                    break;

Which means the button is basically defined as a write-only parameter.
So on every AudioUnit's view there are two sections - Controls and
MyAudioUnitName. You can check :).
The MyAudioUnitName section just displays a cocoa view the way i designed
it in Interface Builder. The Controls section, howevcer, shows its own
controls that the AU host created dynamically, based on parameters I return
in GetParameterInfo. And I would like to get a button there as well as on
the MyAudioUnitName section. But instead a button simply doesn't show
there. When i change the flags to

                    outParameterInfo.flags =
kAudioUnitParameterFlag_IsReadable;
instead of writable, I am getting a weird control, which is not a button
(here's its screenshot from Logic: http://rghost.net/60374972/image.png)

So how can I get a normal button on the Controls section of my audio unit's
view?

I took the idea here:
http://lists.apple.com/archives/coreaudio-api/2005/May/msg00133.html

But apparently it's not working, or i did something wrong.
Can you give me a hint what am i doing wrong?
Thank you!

2015-01-14 6:38 GMT+02:00 Numosh <[email protected]>:

> Hi Nick, as far as I know, you can place a button that refer to start an
> action sequence that would be process by the AU, such as a midi note, audio
> file, etc, the AU itself can be listed as an audio processing output, so
> its listed as an option.
>
> Hope it can help, sorry if its not been a good explanation.
>
> Sent from my iPhone
>
> On Jan 14, 2015, at 09:56, Nick <[email protected]> wrote:
>
> I was also wondering how to make a push button in Controls view on the
> audio unit (all i could get is a checkbox)
>
> 2015-01-14 1:55 GMT+02:00 Nick <[email protected]>:
>
>> The question is related to communication between an "AU kernel" and a
>> Cocoa View, that accompanies it.
>>
>>
>> https://developer.apple.com/library/mac/documentation/MusicAudio/Conceptual/AudioUnitProgrammingGuide/TheAudioUnitView/TheAudioUnitView.html
>>
>> 2015-01-14 0:53 GMT+02:00 Matt Hart <[email protected]>:
>>
>>> AudioUnits don't have views.
>>>
>>> > Hi,
>>> > Sorry for a stupid question, but I can't figure out how to let Audio
>>> Unit know that a button has been clicked in its view?
>>> > I have an audio unit and a separate bundle which contains a Cocoa view
>>> and a view controller.
>>> > What is the right way to notify the audio unit that a button was
>>> pressed?
>>> > Thank you!
>>> > _______________________________________________
>>> > Do not post admin requests to the list. They will be ignored.
>>> > Coreaudio-api mailing list      ([email protected])
>>> > Help/Unsubscribe/Update your Subscription:
>>> >
>>> https://lists.apple.com/mailman/options/coreaudio-api/matt%40matthart.com
>>> >
>>> > This email sent to [email protected]
>>>
>>>
>>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Coreaudio-api mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/coreaudio-api/numosh%40gmail.com
>
> This email sent to [email protected]
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to