MPMA Framework 0.4
Namespaces | Enumerations | Functions
Listener.h File Reference

Controls the sound listener, which all sounds are relative to. Also controls global sound settings. More...

Go to the source code of this file.

Namespaces

namespace  AUDIO
 

Sound playback and streaming.


Enumerations

enum  AUDIO::DistanceModel {
  AUDIO::DISTANCE_NONE = 0x300, AUDIO::DISTANCE_INVERSE, AUDIO::DISTANCE_INVERSE_CLAMPED, AUDIO::DISTANCE_LINEAR,
  AUDIO::DISTANCE_LINEAR_CLAMPED, AUDIO::DISTANCE_EXPONENTIAL, AUDIO::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...

Functions

void AUDIO::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 AUDIO::SetListenerPosition (float x, float y, float z)
 Sets the position the listener is at.
template<typename VectorType >
void AUDIO::SetListenerPosition (const VectorType &pos)
 Sets the position the listener is at.
void AUDIO::SetListenerFacing (float x, float y, float z)
 Sets the direction the listener is facing.
template<typename VectorType >
void AUDIO::SetListenerFacing (const VectorType &dir)
 Sets the direction the listener is facing.
void AUDIO::SetListenerUp (float x, float y, float z)
 Sets the direction that is up from the listener's head.
template<typename VectorType >
void AUDIO::SetListenerUp (const VectorType &up)
 Sets the direction that is up from the listener's head.
void AUDIO::SetListenerVelocity (float x, float y, float z)
 Sets the speed and direction that listener is moving. (used for doppler)
template<typename VectorType >
void AUDIO::SetListenerVelocity (const VectorType &vel)
 Sets the speed and direction that listener is moving. (used for doppler)
void AUDIO::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 AUDIO::SetSpeedOfSound (float value)
 Sets the speed of sound used for doppler calculations. Must be >0. Default is 343.3.
void AUDIO::SetDistanceModel (DistanceModel distanceModel)
 Sets the formula used to calculate how distance affects the volume of sounds in 3D space.

Detailed Description

Controls the sound listener, which all sounds are relative to. Also controls global sound settings.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends