
|
[openbeosmediakit]
||
[Date Prev]
[08-2002 Date Index]
[Date Next]
||
[Thread Prev]
[08-2002 Thread Index]
[Thread Next]
[openbeosmediakit] BroadcastNewParameterValue - issues, solutions?
- From: "David Shipman" <unlyrn@xxxxxxxxxxxxxxx>
- To: openbeosmediakit@xxxxxxxxxxxxx
- Date: Sun, 11 Aug 2002 11:20:15 NZST (+1200)
Hi all...
I'm currently finishing off the interface code for the system mixer
addon, and thought it would be an opportune time to address a concern
regarding BControllable nodes and the way their interfaces are updated.
Currently, many nodes will not update their display in accordance with
parameter values changing - that is, if you change the value by some
other method (another app, a different view of the same controls, etc),
the controls will not move.
Only nodes that implement BroadcastNewParameterValue() in their
SetParameterValue function update correctly - Be's Audio Mixer is an
example of one such node.
However, there are (I feel) significant problems with this solution. At
the very least, it means SetParameterValue is called twice for every
update - once for the initial value, and then again when the broadcast
is received. If you have several views open representing the same
controls, the situation is even worse - it will send a Broadcast
message for each view!
In certain conditions (such as when there are 3 or 4 views open to the
same control), the Broadcast messages will become slightly delayed,
resulting in a constant loop of updating parameter values - try it some
time, its a real mess!
According to the BeBook, in the MediaTheme section -
" if an application uses MakeControlFor() to create individual controls
rather than letting ViewFor() set up the entire view, the application
assumes responsibility for setting the control's value in response to
value change messages. "
I presume this to mean that the BMediaTheme returns handling code for
changing parameter values - so a possible solution would be to use
MediaThemes that set the display directly, rather than calling SetValue
(and triggering another round of updates...)
Any thoughts, suggestions=3F
Thanks,
David Shipman
|

|