Function

AudioQueueSetParameter(_:_:_:)

Sets a playback audio queue parameter value.

Declaration

func AudioQueueSetParameter(_ inAQ: AudioQueueRef, _ inParamID: AudioQueueParameterID, _ inValue: AudioQueueParameterValue) -> OSStatus

Parameters

inAQ

The playback audio queue that you want to set a parameter value on.

inParamID

The ID of the parameter you want to set. In OS X v10.5, audio queues have one parameter available: kAudioQueueParam_Volume, which controls playback gain. See Audio Queue Parameters.

inValue

The parameter value to set.

Return Value

A result code. See Result Codes.

Discussion

Use this function to change the settings for a playback audio queue directly. Changes take effect immediately. To set playback gain at the granularity of an audio queue buffer, use the AudioQueueEnqueueBufferWithParameters(_:_:_:_:_:_:_:_:_:_:) function.