Class used to play a sound from a file or an IO Stream. Sounds are cached if loaded from a file.
More...
|
static float | GlobalVolume [get, set] |
| The global volume of all sounds. More...
|
|
static Vector3 | ListenerPosition [get, set] |
| Where the Listener is in 3D space. More...
|
|
static float | ListenerX [get, set] |
| The Listener's X position. More...
|
|
static float | ListenerY [get, set] |
| The Listener's Y position. More...
|
|
static float | ListenerZ [get, set] |
| The Listener's Z position. More...
|
|
static Vector3 | ListenerDirection [get, set] |
| What direction the Listener is pointing. Should be a unit vector. More...
|
|
float | Pitch [get, set] |
| Adjust the pitch of the sound. Default value is 1. More...
|
|
int | Offset [get, set] |
| The playback offset of the sound in milliseconds. More...
|
|
bool | Loop [get, set] |
| Determines if the sound should loop or not. More...
|
|
int | Duration [get] |
| The duration of the sound in milliseconds. More...
|
|
bool | RelativeToListener [get, set] |
| Whether or not the sound plays relative to the Listener position. Only mono sounds are able to be spatial. More...
|
|
Vector3 | Position [get, set] |
| Where the sound is in 3D space. More...
|
|
float | X [get, set] |
| The sound's X position. More...
|
|
float | Y [get, set] |
| The sound's Y position. More...
|
|
float | Z [get, set] |
| The sound's Z position. More...
|
|
float | Attenuation [get, set] |
| The sound's attenuation factor. Determines how the sound fades over distance. More...
|
|
float | MinimumDistance [get, set] |
| The minimum distance to hear the sound at max volume. Past this distance the sound is faded according to it's attenuation. 0 is an invalid value. More...
|
|
bool | IsPlaying [get] |
| Check if the Sound is currently playing. More...
|
|
Class used to play a sound from a file or an IO Stream. Sounds are cached if loaded from a file.
Otter.Sound.Sound |
( |
string |
source, |
|
|
bool |
loop = false |
|
) |
| |
Load a new sound from a filepath. If this file has been used before it will be loaded from the cache.
- Parameters
-
source | The path to the sound file. |
loop | Determines if the sound should loop. |
Otter.Sound.Sound |
( |
Stream |
stream, |
|
|
bool |
loop = false |
|
) |
| |
Load a new sound from an IO Stream.
- Parameters
-
stream | The memory stream of the sound data. |
loop | Determines if the sound should loop. |
Otter.Sound.Sound |
( |
Sound |
sound | ) |
|
Load a new sound from copying another sound.
- Parameters
-
sound | The sound to copy from. |
static void Otter.Sound.CenterListener |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
static |
Centers the Listener at the given position.
- Parameters
-
static void Otter.Sound.CenterListener |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
static |
Centers the Listener at the given position.
- Parameters
-
static void Otter.Sound.CenterListener |
( |
Vector3 |
position | ) |
|
|
static |
Centers the Listener at the given position.
- Parameters
-
static void Otter.Sound.CenterListener |
( |
Vector2 |
position | ) |
|
|
static |
Centers the Listener at the given position.
- Parameters
-
void Otter.Sound.CenterSound |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
Centers the sound at the given position.
- Parameters
-
void Otter.Sound.CenterSound |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
Centers the sound at the given position.
- Parameters
-
void Otter.Sound.CenterSound |
( |
Vector3 |
position | ) |
|
Centers the sound at the given position.
- Parameters
-
void Otter.Sound.CenterSound |
( |
Vector2 |
position | ) |
|
Centers the sound at the given position.
- Parameters
-
void Otter.Sound.Pause |
( |
| ) |
|
void Otter.Sound.Play |
( |
| ) |
|
static void Otter.Sound.PointListener |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
static |
Points the Listener in the given direction.
- Parameters
-
static void Otter.Sound.PointListener |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
static |
Points the Listener in the given direction.
- Parameters
-
static void Otter.Sound.PointListener |
( |
Vector3 |
direction | ) |
|
|
static |
Points the Listener in the given direction.
- Parameters
-
static void Otter.Sound.PointListener |
( |
Vector2 |
direction | ) |
|
|
static |
Points the Listener in the given direction.
- Parameters
-
void Otter.Sound.Stop |
( |
| ) |
|
float Otter.Sound.Volume = 1f |
The local volume of this sound.
float Otter.Sound.Attenuation |
|
getset |
The sound's attenuation factor. Determines how the sound fades over distance.
The duration of the sound in milliseconds.
float Otter.Sound.GlobalVolume |
|
staticgetset |
The global volume of all sounds.
bool Otter.Sound.IsPlaying |
|
get |
Check if the Sound is currently playing.
Vector3 Otter.Sound.ListenerDirection |
|
staticgetset |
What direction the Listener is pointing. Should be a unit vector.
Vector3 Otter.Sound.ListenerPosition |
|
staticgetset |
Where the Listener is in 3D space.
float Otter.Sound.ListenerX |
|
staticgetset |
The Listener's X position.
float Otter.Sound.ListenerY |
|
staticgetset |
The Listener's Y position.
float Otter.Sound.ListenerZ |
|
staticgetset |
The Listener's Z position.
Determines if the sound should loop or not.
float Otter.Sound.MinimumDistance |
|
getset |
The minimum distance to hear the sound at max volume. Past this distance the sound is faded according to it's attenuation. 0 is an invalid value.
The playback offset of the sound in milliseconds.
Adjust the pitch of the sound. Default value is 1.
Where the sound is in 3D space.
bool Otter.Sound.RelativeToListener |
|
getset |
Whether or not the sound plays relative to the Listener position. Only mono sounds are able to be spatial.
The documentation for this class was generated from the following file: