Sound Class Reference
#include <Sound.h>
Public Member Functions | |
| Sound () | |
| ~Sound () | |
| bool | init (std::string file) |
| void | release () |
| void | play (bool bRepeat=true) |
| void | stop () |
| void | setPos (gmtl::Vec3f pos) |
| void | setPitch (float pitch) |
| void | setVelocity (gmtl::Vec3f vel) |
| void | setGain (float value) |
| void | setMaxDistance (float value) |
| void | setRolloffFactor (float value) |
| void | setRelativeSource (bool posRelToListener) |
| gmtl::Vec3f | getPos () |
| void | setupDistanceAttenuationEmulation (float scale, float off) |
| void | setDistEmul (float dist) |
| void | setDistEmulOpenaALInverseDistance (float dist) |
| void | setupDopplerShift (float speedOfSound, float factor) |
| void | setDopplerShift (gmtl::Vec3f velList, gmtl::Vec3f posListner, gmtl::Vec3f velSrc, gmtl::Vec3f posSrc) |
| void | resetDopplerShift () |
Static Public Member Functions | |
| static void | cleanup () |
| static void | setListener (gmtl::Vec3f pos, gmtl::Vec3f up, gmtl::Vec3f forward, gmtl::Vec3f velocity) |
| static void | setDistanceModel (ALenum model) |
Static Protected Member Functions | |
| static bool | staticInit () |
Protected Attributes | |
| gmtl::Vec3f | pos |
| gmtl::Vec3f | velocity |
| ALuint | sndBuffer |
| ALuint | sndSource |
| bool | bInitialized |
| bool | bPlaying |
| bool | posRelToListener |
| ALsizei | size |
| ALsizei | freq |
| ALenum | format |
| ALfloat | gain |
| ALfloat | maxDistance |
| ALfloat | rolloff |
| ALfloat | pitch |
| ALfloat | emulDistScale |
| ALfloat | emulDistOff |
| ALfloat | emulDist |
| ALfloat | emulSpeedOfSound |
| ALfloat | emulDopplerFactor |
Static Protected Attributes | |
| static ALCdevice * | device = NULL |
| static ALCcontext * | context = NULL |
| static gmtl::Vec3f | posListener = gmtl::Vec3f(0, 0, 0) |
| static gmtl::Vec3f | upListener = gmtl::Vec3f(0, 1, 0) |
| static gmtl::Vec3f | forwardListener = gmtl::Vec3f(0, 0, 1) |
| static gmtl::Vec3f | velocityListener = gmtl::Vec3f(0, 0, 0) |
Detailed Description
// TODO: check if this works: If the 3D-sound seems to work not properly, try to call alcOpenDevice with string "Generic Software"Constructor & Destructor Documentation
| Sound::Sound | ( | ) |
| Sound::~Sound | ( | ) |
Member Function Documentation
| void Sound::cleanup | ( | void | ) | [static] |
| gmtl::Vec3f Sound::getPos | ( | ) |
| bool Sound::init | ( | std::string | file | ) |
| void Sound::play | ( | bool | bRepeat = true |
) |
| void Sound::release | ( | ) |
| void Sound::resetDopplerShift | ( | ) |
| void Sound::setDistanceModel | ( | ALenum | model | ) | [static] |
| void Sound::setDistEmul | ( | float | dist | ) |
| void Sound::setDistEmulOpenaALInverseDistance | ( | float | dist | ) |
| void Sound::setDopplerShift | ( | gmtl::Vec3f | velList, | |
| gmtl::Vec3f | posListner, | |||
| gmtl::Vec3f | velSrc, | |||
| gmtl::Vec3f | posSrc | |||
| ) |
| void Sound::setGain | ( | float | value | ) |
| void Sound::setListener | ( | gmtl::Vec3f | pos, | |
| gmtl::Vec3f | up, | |||
| gmtl::Vec3f | forward, | |||
| gmtl::Vec3f | velocity | |||
| ) | [static] |
| void Sound::setMaxDistance | ( | float | value | ) |
| void Sound::setPitch | ( | float | pitch | ) |
| void Sound::setPos | ( | gmtl::Vec3f | pos | ) |
| void Sound::setRelativeSource | ( | bool | posRelToListener | ) |
| void Sound::setRolloffFactor | ( | float | value | ) |
| void Sound::setupDistanceAttenuationEmulation | ( | float | scale, | |
| float | off | |||
| ) |
| void Sound::setupDopplerShift | ( | float | speedOfSound, | |
| float | factor | |||
| ) |
| void Sound::setVelocity | ( | gmtl::Vec3f | vel | ) |
| bool Sound::staticInit | ( | ) | [static, protected] |
| void Sound::stop | ( | ) |
Member Data Documentation
bool Sound::bInitialized [protected] |
bool Sound::bPlaying [protected] |
ALCcontext * Sound::context = NULL [static, protected] |
ALCdevice * Sound::device = NULL [static, protected] |
ALfloat Sound::emulDist [protected] |
ALfloat Sound::emulDistOff [protected] |
ALfloat Sound::emulDistScale [protected] |
ALfloat Sound::emulDopplerFactor [protected] |
ALfloat Sound::emulSpeedOfSound [protected] |
ALenum Sound::format [protected] |
gmtl::Vec3f Sound::forwardListener = gmtl::Vec3f(0, 0, 1) [static, protected] |
ALsizei Sound::freq [protected] |
ALfloat Sound::gain [protected] |
ALfloat Sound::maxDistance [protected] |
ALfloat Sound::pitch [protected] |
gmtl::Vec3f Sound::pos [protected] |
gmtl::Vec3f Sound::posListener = gmtl::Vec3f(0, 0, 0) [static, protected] |
bool Sound::posRelToListener [protected] |
ALfloat Sound::rolloff [protected] |
ALsizei Sound::size [protected] |
ALuint Sound::sndBuffer [protected] |
ALuint Sound::sndSource [protected] |
gmtl::Vec3f Sound::upListener = gmtl::Vec3f(0, 1, 0) [static, protected] |
gmtl::Vec3f Sound::velocity [protected] |
gmtl::Vec3f Sound::velocityListener = gmtl::Vec3f(0, 0, 0) [static, protected] |
The documentation for this class was generated from the following files:
Generated on Wed Oct 20 16:12:00 2010 for inVRs by
1.5.8