Audio. More...
Classes | |
class | Buffer |
Represents a container for sound data, and handles the details of storage and streaming. This is a reference counted object, so all copies of the object refer to the same thing, and the object's data will only be freed once all copies are freed. More... | |
class | Player |
Used to play sound buffers. This is a reference counted object, so all copies of the object refer to the same thing, and the object's data will only be freed once all copies are freed. More... | |
class | Source |
Represents a source of sound sample data. More... | |
class | LoopSource |
Source that creates a streaming infinite length loop from another source. If reading data reaches the end or the loop endpoint, it seeks back to the loop start point. More... | |
class | WavFileSource |
Reads sound from a .wav file. More... | |
class | VorbisFileSource |
Reads sound from a .ogg/.ogm file. More... | |
class | FlacFileSource |
Reads sound from a .flac file. More... | |
class | MonoToStereoSource |
Combines two mono sources into a stereo source. More... | |
class | EmptySource |
Generates nothing. More... | |
class | WhiteNoiseSource |
White noise generator. More... | |
Enumerations | |
enum | BufferBehavior { STATIC_DATA = 0x100, STREAM_DATA } |
Determines how the buffer stores data, and how it reads data from its source. More... | |
enum | DistanceModel { DISTANCE_NONE = 0x300, DISTANCE_INVERSE, DISTANCE_INVERSE_CLAMPED, DISTANCE_LINEAR, DISTANCE_LINEAR_CLAMPED, DISTANCE_EXPONENTIAL, DISTANCE_EXPONENTIAL_CLAMPED } |
Determines how distance affects the volume of 3D sounds. Most of the parameters used here can be found in the Player class (See Player.h). More... | |
enum | RenderMode { POSITIONAL = 0x200, FIXED } |
Determines how the sound should be played back. More... | |
Functions | |
void | SetGlobalVolume (float value) |
Sets the global sound volume level that affects all sounds. Value can be from 0 being silence to 1 being normal. Default is 1. | |
void | SetListenerPosition (float x, float y, float z) |
Sets the position the listener is at. | |
void | SetListenerFacing (float x, float y, float z) |
Sets the direction the listener is facing. | |
void | SetListenerUp (float x, float y, float z) |
Sets the direction that is up from the listener's head. | |
void | SetListenerVelocity (float x, float y, float z) |
Sets the speed and direction that listener is moving. (used for doppler). | |
void | SetDopplerFactor (float value) |
A scalar(>=0) that is can be used to emphasize or reduce the doppler effect globally. Default is 1. Setting to 0 disables doppler. | |
void | SetSpeedOfSound (float value) |
Sets the speed of sound used for doppler calculations. Must be >0. Default is 343.3. | |
void | SetDistanceModel (DistanceModel distanceModel) |
Sets the formula used to calculate how distance affects the volume of sounds in 3D space. | |
template<typename VectorType > | |
void | SetListenerPosition (const VectorType &pos) |
Sets the position the listener is at. | |
template<typename VectorType > | |
void | SetListenerFacing (const VectorType &dir) |
Sets the direction the listener is facing. | |
template<typename VectorType > | |
void | SetListenerUp (const VectorType &up) |
Sets the direction that is up from the listener's head. | |
template<typename VectorType > | |
void | SetListenerVelocity (const VectorType &vel) |
Sets the speed and direction that listener is moving. (used for doppler). | |
Variables | |
const nuint | FINITE_DATA = (nuint)(0-2) |
There is a finite amount of data left, but the source doesn't know exactly how much. | |
const nuint | INFINITE_DATA = (nuint)(0-1) |
The source will never run out of data. |
Audio.
Sound playback and streaming.
Determines how the buffer stores data, and how it reads data from its source.
enum AUDIO::DistanceModel |
Determines how distance affects the volume of 3D sounds. Most of the parameters used here can be found in the Player class (See Player.h).
enum AUDIO::RenderMode |
Determines how the sound should be played back.