• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AU from scratch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AU from scratch


  • Subject: Re: AU from scratch
  • From: William Stewart <email@hidden>
  • Date: Wed, 10 Dec 2003 16:09:02 -0800

On 10/12/2003, at 1:51 PM, Scott Ruda wrote:


On Dec 10, 2003, at 12:24 PM, William Stewart wrote:

OK, I must be missing something then. How do I respond to a selection in a popup menu or a button push? Some of the example code I've seen handles it in SetParameter. What is the right way?

If you need to respond to this when the SetParameter call is made, then yes, you'd need to overwrite this method.

However, we will typically not respond directly to SetParameter calls, but rather when asked to Render get the current values of the parameters and use those values in the render call.

Parameters are not designed or intended to be used to signify to the AU major state changes (these are down with Property calls)

I have a setting in a MusicDevice AU that is relatively heavyweight to change (rebuilding tables and such) that I don't think should be handled in the Render call. The recalculated table values will eventually be picked up by the Render call, but I think it would be better to rebuild the tables in a way that doesn't hold off current rendering.

So how do I create a custom property that will be displayed as a popup menu in a Generic View and handle a change event on that popup? I don't see any of the example code using custom properties, and I don't see how GenericAUView would create widgets for those. If I've missed the documentation or examples for that, please point me to them.

No, you haven't missed anything. There is no way for a generic view to know about custom properties. So, if you are going to deal with parameters you are going to have to deal with threading issues (ie. you are in the midst of making this change and a render call comes in on another thread).

BTW, as a test of properties and their UIs, I did what I think should show the RenderQuality property as a popup in the GenericView (I supplied cases in GetPropertyInfo and GetProperty to return info for them, set an initial value, and created a property listener for that id). The popup kind of shows up, but the widget is cut off and half drawn, with no Properties header shown for that section. I also don't get any notification of a change to it in the property listener. I see the property header and that RenderQuality popup in other Generic AU views, so it must work, so I must be doing something wrong. Again, any example code you can point me to would be greatly appreciated.

All you need to do is implement the RenderQuality property and it should work. (It doesn't come up as a parameter, but in the top area of the properties - its shown in the view for the DSLMusicDevice - and that is appearing just because the view sees that the AU implements this property)

Bill


Thanks,
Scott


-- 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
________________________________________________________________________ __
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
References: 
 >Re: AU from scratch (From: Scott Ruda <email@hidden>)
 >Re: AU from scratch (From: William Stewart <email@hidden>)
 >Re: AU from scratch (From: Scott Ruda <email@hidden>)
 >Re: AU from scratch (From: William Stewart <email@hidden>)
 >Re: AU from scratch (From: Scott Ruda <email@hidden>)

  • Prev by Date: Re: AU Format Negotiation
  • Next by Date: Re: Polling Callback, Threads [Attn: Michael Thornburgh]
  • Previous by thread: Re: AU from scratch
  • Next by thread: Re: AU from scratch
  • Index(es):
    • Date
    • Thread