AudioUnitReset

Function AudioUnitReset 

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

reset an audio unit’s render state

This call will clear any render state of an audio unit. For instance, with a delay or reverb type of audio unit reset will clear any of the delay lines maintained within the audio unit. Typically, this call is made when an audio unit was previously rendering, and was taken out of the render chain (say, the track it is in was muted) and is being added back in (unmuted). The host should reset the audio unit before adding it back so that it doesn’t produce audio from its delay lines that is no longer valid.

The call should only clear memory, it should NOT allocate or free memory resources (this is done in the Initialize calls).

Parameter inUnit: the audio unit

Parameter inScope: the scope - typically this is set to GlobalScope

Parameter inElement: the element - typically this is set to 0

Returns: noErr, or an audio unit error

§Safety

in_unit must be a valid pointer.