Skip to main content

AudioUnitSetParameter

Function AudioUnitSetParameter 

Source
pub unsafe extern "C-unwind" fn AudioUnitSetParameter(
    in_unit: *mut OpaqueAudioComponentInstance,
    in_id: u32,
    in_scope: u32,
    in_element: u32,
    in_value: f32,
    in_buffer_offset_in_frames: u32,
) -> i32
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.