Instance Method

tokenByAddingParameterObserver:

Adds an observer for a single parameter or all parameters in a group.

Declaration

- (AUParameterObserverToken)tokenByAddingParameterObserver:(AUParameterObserver)observer;

Parameters

observer

A block called after the value of a parameter has changed.

Return Value

A token which can be passed to the removeParameterObserver: or setValue:originator: methods.

Discussion

An audio unit view can use an observer to be notified of changes to a single parameter or all parameters in a group. These callbacks are throttled so as to limit the rate of redundant notifications in the case of frequent changes to a single parameter.

This block is called in an arbitrary thread context and it is responsible for thread-safety. It must not make any calls to add or remove other observers, including itself, as this will deadlock.

An audio unit should interact with the parameter node via the implementorValueObserver and implementorValueProvider properties.

See Also

Observers

- tokenByAddingParameterRecordingObserver:

Adds a recording observer for a single parameter or all parameters in a group.

- removeParameterObserver:

Remove a specific parameter observer.