Back to monogame.net
Show / Hide Table of Contents

Class AudioEmitter

Represents a 3D audio emitter. Used to simulate 3D audio effects.

Inheritance
Object
AudioEmitter
Namespace: Microsoft.Xna.Framework.Audio
Assembly: MonoGame.Framework.dll
Syntax
public class AudioEmitter : object

Constructors

AudioEmitter()

Initializes a new AudioEmitter instance.

Declaration
public AudioEmitter()

Properties

DopplerScale

Gets or sets a scale applied to the Doppler effect between the AudioEmitter and an AudioListener.

Declaration
public float DopplerScale { get; set; }
Property Value
Type Description
Single
Remarks

Defaults to 1.0

A value of 1.0 leaves the Doppler effect unmodified.

Forward

Gets or sets the emitter's forward vector.

Declaration
public Vector3 Forward { get; set; }
Property Value
Type Description
Vector3
Remarks

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

Used with AudioListener.Velocity to calculate Doppler values.

The Forward and Up values must be orthonormal.

Position

Gets or sets the position of this emitter.

Declaration
public Vector3 Position { get; set; }
Property Value
Type Description
Vector3

Up

Gets or sets the emitter's Up vector.

Declaration
public Vector3 Up { get; set; }
Property Value
Type Description
Vector3
Remarks

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

The Up and Forward vectors must be orthonormal.

Velocity

Gets or sets the emitter's velocity vector.

Declaration
public Vector3 Velocity { get; set; }
Property Value
Type Description
Vector3
Remarks

Defaults to Vector3.Zero.

This value is only used when calculating Doppler values.

In This Article
Back to top

© 2012 Microsoft Corporation. All rights reserved.

© The MonoGame Team.