#include <Audio.h>
Public Member Functions | |
| SoundSource (const SoundBuffer &buffer) | |
| Create attached to a specific buffer. | |
| ~SoundSource () | |
| void | set_looping (bool loop=true) |
| Make the sound either stop when it finishes or loop continuously. | |
| void | set_position (btVector3 position) |
| Set the global position where the sound originates from. | |
| void | set_velocity (btVector3 velocity) |
| Set the velocity of the sound for doppler shift. | |
| void | set_gain (ALfloat gain) |
| Set how loud the noise is. | |
| void | set_pitch (ALfloat pitch) |
| void | play () |
| Start making the noise. | |
| void | stop () |
| Stop making the noise. | |
| const SoundBuffer & | get_buffer () const |
Private Member Functions | |
| SoundSource (const SoundSource &source) | |
| SoundSource & | operator= (const SoundSource &source) |
Private Attributes | |
| const SoundBuffer & | m_buffer |
| bool | m_looping |
| ALfloat | m_gain |
| ALfloat | m_pitch |
| btVector3 | m_position |
| btVector3 | m_velocity |
| bool | m_playing |
| bool | m_started |
| True if OpenAL started playing, false if it should start from the begining. | |
Friends | |
| class | Audio |
Makes a sound when play() is called. Deleting stops the noise. First load the sound you want using a SoundBuffer.
This is not directly a wrapper for openAL's sources. A SoundSource creates as many OpenAL sources as there are SoundListners. OpenAL is fixed to one listner.
Definition at line 162 of file Audio.h.
| Engine::SoundSource::SoundSource | ( | const SoundBuffer & | buffer | ) |
Create attached to a specific buffer.
The buffer contains the sound that will be played, so don't delete it until you have deleted the SoundSource.
| Engine::SoundSource::SoundSource | ( | const SoundSource & | source | ) | [private] |
| const SoundBuffer & Engine::SoundSource::get_buffer | ( | ) | const |
| SoundSource& Engine::SoundSource::operator= | ( | const SoundSource & | source | ) | [private] |
| void Engine::SoundSource::play | ( | ) |
| void Engine::SoundSource::set_gain | ( | ALfloat | gain | ) |
| void Engine::SoundSource::set_looping | ( | bool | loop = true |
) |
| void Engine::SoundSource::set_position | ( | btVector3 | position | ) |
| void Engine::SoundSource::set_velocity | ( | btVector3 | velocity | ) |
const SoundBuffer& Engine::SoundSource::m_buffer [private] |
ALfloat Engine::SoundSource::m_gain [private] |
bool Engine::SoundSource::m_looping [private] |
ALfloat Engine::SoundSource::m_pitch [private] |
bool Engine::SoundSource::m_playing [private] |
btVector3 Engine::SoundSource::m_position [private] |
bool Engine::SoundSource::m_started [private] |
btVector3 Engine::SoundSource::m_velocity [private] |
Generated at Mon Sep 6 00:41:17 2010 by Doxygen version 1.4.7 for Racer version svn335.