Function

AudioUnitSetParameter

Sets the value of an audio unit parameter.

Declaration

OSStatus AudioUnitSetParameter(AudioUnit inUnit, AudioUnitParameterID inID, AudioUnitScope inScope, AudioUnitElement inElement, AudioUnitParameterValue inValue, UInt32 inBufferOffsetInFrames);

Parameters

inUnit

The audio unit that you want to set a parameter value for.

inID

The audio unit parameter identifier.

inScope

The audio unit scope for the parameter.

inElement

The audio unit element for the parameter.

inValue

The value that you want to apply to the parameter.

inBufferOffsetInFrames

Set this to 0. To schedule the setting of a parameter value, use the AudioUnitScheduleParameters function.

Return Value

A result code.

See Also

Using Audio Unit Parameters

AudioUnitGetParameter

Gets the value of an audio unit parameter.

AudioUnitScheduleParameters

Schedules changes to the value of an audio unit parameter.