Table of Contents

Class AudioListener

Namespace
Microsoft.Xna.Framework.Audio
Assembly
MonoGame.Framework.dll

Represents a 3D audio listener. Used when simulating 3D Audio.

public class AudioListener
Inheritance
AudioListener
Inherited Members

Constructors

AudioListener()

Create an AudioListener instance.

public AudioListener()

Properties

Forward

Gets or sets the listener's forward vector.

public Vector3 Forward { get; set; }

Property Value

Vector3

Remarks

Defaults to Vector3.Forward. (new Vector3(0, 0, -1))

Used with AudioListener.Velocity and AudioEmitter.Velocity to calculate Doppler values.

The Forward and Up vectors must be orthonormal.

Position

Gets or sets the listener's position.

public Vector3 Position { get; set; }

Property Value

Vector3

Remarks

Defaults to Vector3.Zero.

Up

Gets or sets the listener's up vector..

public Vector3 Up { get; set; }

Property Value

Vector3

Remarks

Defaults to Vector3.Up (New Vector3(0, -1, 0)).

Used with AudioListener.Velocity and AudioEmitter.Velocity to calculate Doppler values.

The values of the Forward and Up vectors must be orthonormal.

Velocity

Gets or sets the listener's velocity vector.

public Vector3 Velocity { get; set; }

Property Value

Vector3

Remarks

Defaults to Vector3.Zero.

Scaled by DopplerScale to calculate the Doppler effect value applied to a Cue.

This value is only used to calculate Doppler values.