Class

AVAudioEnvironmentNode

A mixer node that simulates a 3D audio environment.

Declaration

class AVAudioEnvironmentNode : AVAudioNode

Overview

Any node that conforms to the AVAudioMixing protocol (for example, AVAudioPlayerNode) can act as a source in this environment.

The environment has an implicit “listener.” By controlling the listener’s position and orientation, the application controls the way the user experiences the virtual world. This node also defines properties for distance attenuation and reverberation that help characterize the environment.

Only inputs with a mono channel connection format to the environment node are spatialized. If the input is stereo, the audio is passed through without being spatialized. Inputs with connection formats of more than two channels aren't supported.

To set the environment node’s output to a multichannel format, use an AVAudioFormat that has one of the following Audio Channel Layout Tags:

Topics

Creating an Environment Node

init()

Initializes a new environment node.

Getting and Setting Environment Parameters

var distanceAttenuationParameters: AVAudioEnvironmentDistanceAttenuationParameters

The distance attenuation parameters for the environment.

var listenerAngularOrientation: AVAudio3DAngularOrientation

The listener's angular orientation in the environment.

var listenerVectorOrientation: AVAudio3DVectorOrientation

The listener's vector orientation in the environment.

var listenerPosition: AVAudio3DPoint

The listener's position in the 3D environment.

var reverbParameters: AVAudioEnvironmentReverbParameters

The reverb parameters for the environment.

var outputVolume: Float

The mixer's output volume.

Getting the Available Rendering Algorithms

var applicableRenderingAlgorithms: [NSNumber]

An array of rendering algorithms applicable to the environment node.

Getting the Input Bus

Relationships

Inherits From

See Also

3D Environment Options

class AVAudioEnvironmentDistanceAttenuationParameters

A class that specifies the attenuation distance, the gradual loss in audio intensity, and other characteristics.

class AVAudioEnvironmentReverbParameters

A class that encapsulates the parameters that you use to control the reverb of the environment node class.

protocol AVAudio3DMixing

A protocol defining 3D mixing properties.

struct AVAudio3DAngularOrientation

A structure representing the angular orientation of the listener in 3D space.

struct AVAudio3DPoint

A structure representing a point in 3D space.

struct AVAudio3DVectorOrientation

A structure representing two orthogonal vectors that describe the orientation of the listener in 3D space.

typealias AVAudio3DVector

A structure representing a vector in 3D space.

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