Contents

AUScheduleParameterBlock

A block to schedule parameter changes.

Declaration

typealias AUScheduleParameterBlock = (AUEventSampleTime, AUAudioFrameCount, AUParameterAddress, AUValue) -> Void

Discussion

Check the parameter’s flags to determine whether the parameter is rampable. If a parameter isn’t rampable, a ramp duration of 0 changes it immediately to the target value, and a nonzero ramp duration leaves it unchanged.

The block takes the following parameters:

eventSampleTime

The sample time at which the parameter begins changing. When you schedule parameters during the render cycle, such as from a render observer you add with token(byAddingRenderObserver:), pass the AUEventSampleTimeImmediate value plus an optional buffer offset of fewer than 4096 sample frames to schedule the event at that position in the current render cycle.

rampDurationSampleFrames

The number of sample frames over which the parameter’s return value is to ramp, or 0 if the parameter change should take effect immediately.

parameterAddress

The parameter’s address.

value

The parameter’s new value if the ramp duration is 0; otherwise, the value at the end of the scheduled ramp.

See Also

Audio Unit Types