Instance Property

outputVolume

The system wide output volume set by the user.

Declaration

var outputVolume: Float { get }

Discussion

A value in the range 0.0 to 1.0, with 0.0 representing the minimum volume and 1.0 representing the maximum volume.

The system wide output volume can be set directly only by the user; to provide volume control in your app, use the MPVolumeView class.

You can observe changes to the value of this property by using Key-value observing.

See Also

Working with Audio Device Settings

var inputGain: Float

The gain applied to inputs associated with the session.

var isInputGainSettable: Bool

A Boolean value that indicates whether the input gain can be set.

func setInputGain(Float)

Changes the input gain to the specified value.

var inputLatency: TimeInterval

The latency for audio input, measured in seconds.

var outputLatency: TimeInterval

The latency for audio output, measured in seconds.

var sampleRate: Double

The current audio sample rate, in hertz.

var preferredSampleRate: Double

The preferred sample rate, in hertz.

func setPreferredSampleRate(Double)

Sets the preferred sample rate for input and output.

var ioBufferDuration: TimeInterval

The current I/O buffer duration, in seconds.

var preferredIOBufferDuration: TimeInterval

The preferred I/O buffer duration, in seconds.

func setPreferredIOBufferDuration(TimeInterval)

Sets the preferred audio I/O buffer duration, in seconds.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software