AudioUnitSetParameter

Function AudioUnitSetParameter 

Source
pub unsafe extern "C-unwind" fn AudioUnitSetParameter(
    in_unit: AudioUnit,
    in_id: AudioUnitParameterID,
    in_scope: AudioUnitScope,
    in_element: AudioUnitElement,
    in_value: AudioUnitParameterValue,
    in_buffer_offset_in_frames: u32,
) -> i32
Available on crate features AUComponent and AudioComponent only.
Expand description

Set the value of a parameter

Set the value of a parameter as specified by its ID, scope and element. Parameter IDs are consistent across all of the elements in a scope - so for a mixer, the “input volume” parameter can be applied on any input, and the particular input is specified by the elementID.

Parameter inUnit: the audio unit

Parameter inID: the parameter ID

Parameter inScope: the scope for the parameter

Parameter inElement: the element on the scope for the parameter

Parameter inValue: the new value for the parameter.

Parameter inBufferOffsetInFrames: generally should be set to zero - see AudioUnitScheduleParameters

Returns: noErr, or an audio unit error code (such as InvalidParameter)

§Safety

in_unit must be a valid pointer.