AudioEmitter Class
Namespace: Stride.AudioAssembly: Stride.Audio.dll
Represents a 3D audio emitter in the audio scene. This object, used in combination with an AudioListener, can simulate 3D audio localization effects for a given sound implementing the IPositionableSound interface. For more details take a look at the Apply3D(AudioEmitter) function.
public class AudioEmitter
Name | Description | |
---|---|---|
Constructors | ||
AudioEmitter() | Initializes a new instance of the AudioEmitter class. |
|
Fields | ||
Position | The position of the emitter in the 3D world. |
|
Velocity | The velocity of the emitter in the 3D world. |
|
Properties | ||
Forward | Gets or sets the forward orientation vector for this emitter. This vector represents the orientation the emitter is looking at. |
|
Up | Gets or sets the Up orientation vector for this emitter. This vector up of the world for the emitter. |
Constructors
AudioEmitter()
Initializes a new instance of the AudioEmitter class.
public AudioEmitter()
Fields
Position
The position of the emitter in the 3D world.
public Vector3 Position
Field Value
Type | Description |
---|---|
Vector3 |
Velocity
The velocity of the emitter in the 3D world.
public Vector3 Velocity
Field Value
Type | Description |
---|---|
Vector3 |
Remarks
This is only used to calculate the doppler effect on the sound effect
Properties
Forward
Gets or sets the forward orientation vector for this emitter. This vector represents the orientation the emitter is looking at.
public Vector3 Forward { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
By default, this value is (0,0,1).
The value provided will be normalized if it is not already.
The values of the Forward and Up vectors must be orthonormal (at right angles to one another). Behavior is undefined if these vectors are not orthonormal.
Doppler and Matrix values between an
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The value provided to the set accessor is (0,0,0) or Up. |
Up
Gets or sets the Up orientation vector for this emitter. This vector up of the world for the emitter.
public Vector3 Up { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Remarks
By default, this value is (0,1,0).
The value provided will be normalized if it is not already.
The values of the Forward and Up vectors must be orthonormal (at right angles to one another). Behavior is undefined if these vectors are not orthonormal.
Doppler and Matrix values between an
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The value provided to the set accessor is (0,0,0). |