#include <spOpenALSound.hpp>
Public Member Functions | |
OpenALSound () | |
~OpenALSound () | |
bool | reload (const io::stringc &Filename, u8 BufferCount=DEF_SOUND_BUFFERCOUNT) |
void | close () |
void | play () |
Starts playing the sound. The sound will be played from the beginning. | |
void | pause (bool Paused=true) |
Pauses (if "Paused" is true) or resumes (if "Paused" if false) the sound. | |
void | stop () |
Stops playing the sound. | |
void | emit2D (f32 Volume=1.0f, bool UseEffectSlot=true) |
Emits a 2D sound with the specified volume. Use this for short sound samples. | |
void | emit3D (const dim::vector3df &Point, f32 Volume=1.0f, bool UseEffectSlot=true) |
Emits a 3D sound with the specified volume. Use this for short, volumetric sound samples. | |
void | setSeek (f32 Seek) |
f32 | getSeek () const |
void | setVolume (f32 Volume) |
void | setSpeed (f32 Speed) |
void | setBalance (f32 Balance) |
void | setLoop (bool Enable) |
Enables or disables loop playback mode. If true the sound will played for ever. By default false. | |
bool | playing () const |
Returns true if this sound is currenlty playing. | |
bool | finish () const |
Returns true if the sound has reached the end. | |
f32 | getLength () const |
Returns the length of the sound (in seconds). | |
bool | valid () const |
Returns true if the object is a valid sound. Otherwise no sound file has been loaded or could not load. | |
void | setPosition (const dim::vector3df &Position) |
Sets the 3D global position of that sound. Only for volumetric sounds. | |
void | setVelocity (const dim::vector3df &Veclotiy) |
Sets the 3D global velocity of that sound. Only for volumetric sound and sound systems which support the 'doppler' effect. | |
void | setVolumetric (bool isVolumetric) |
void | setVolumetricRadius (f32 Radius) |
sp::audio::OpenALSound::OpenALSound | ( | ) |
sp::audio::OpenALSound::~OpenALSound | ( | ) |
void sp::audio::OpenALSound::close | ( | ) | [virtual] |
Implements sp::audio::Sound.
void sp::audio::OpenALSound::emit2D | ( | f32 | Volume = 1.0f , |
|
bool | UseEffectSlot = true | |||
) | [virtual] |
Emits a 2D sound with the specified volume. Use this for short sound samples.
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::emit3D | ( | const dim::vector3df & | Point, | |
f32 | Volume = 1.0f , |
|||
bool | UseEffectSlot = true | |||
) | [virtual] |
Emits a 3D sound with the specified volume. Use this for short, volumetric sound samples.
Reimplemented from sp::audio::Sound.
bool sp::audio::OpenALSound::finish | ( | ) | const [virtual] |
Returns true if the sound has reached the end.
Reimplemented from sp::audio::Sound.
f32 sp::audio::OpenALSound::getLength | ( | ) | const [virtual] |
Returns the length of the sound (in seconds).
Implements sp::audio::Sound.
f32 sp::audio::OpenALSound::getSeek | ( | ) | const [virtual] |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::pause | ( | bool | Paused = true |
) | [virtual] |
Pauses (if "Paused" is true) or resumes (if "Paused" if false) the sound.
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::play | ( | ) | [virtual] |
Starts playing the sound. The sound will be played from the beginning.
Reimplemented from sp::audio::Sound.
bool sp::audio::OpenALSound::playing | ( | ) | const [virtual] |
Returns true if this sound is currenlty playing.
Reimplemented from sp::audio::Sound.
bool sp::audio::OpenALSound::reload | ( | const io::stringc & | Filename, | |
u8 | BufferCount = DEF_SOUND_BUFFERCOUNT | |||
) | [virtual] |
Implements sp::audio::Sound.
void sp::audio::OpenALSound::setBalance | ( | f32 | Balance | ) | [virtual] |
Sets the balance of the sound.
Balance,: | Specifies the balance between two sound-output devices (the sound boxes). Must lie between -1.0 (left) and 1.0 (right). By default 0.0 (in the middle, both boxes have the same volume). |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setLoop | ( | bool | Enable | ) | [virtual] |
Enables or disables loop playback mode. If true the sound will played for ever. By default false.
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setPosition | ( | const dim::vector3df & | Position | ) | [virtual] |
Sets the 3D global position of that sound. Only for volumetric sounds.
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setSeek | ( | f32 | Seek | ) | [virtual] |
Sets the seek or status of the sound. To use this function "play" needs not to be called.
Seek,: | Specifies the status. Must lie between 0.0 and 1.0. |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setSpeed | ( | f32 | Speed | ) | [virtual] |
Sets the speed or frequency of the sound.
Speed,: | Specifies the speed. Must lie between 0.0 (slow, where with 0.0 the sound stops to play and 2.0 (fast). By default 1.0 (normal). Backwards playing is not possible! |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setVelocity | ( | const dim::vector3df & | Veclotiy | ) | [virtual] |
Sets the 3D global velocity of that sound. Only for volumetric sound and sound systems which support the 'doppler' effect.
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setVolume | ( | f32 | Volume | ) | [virtual] |
Sets the volume of the sound.
Volume,: | Specifies the volume for the sound. Must lie between 0.0 (quiet) and 1.0 (loud). By default 1.0. |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setVolumetric | ( | bool | isVolumetric | ) | [virtual] |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::setVolumetricRadius | ( | f32 | Radius | ) | [virtual] |
Reimplemented from sp::audio::Sound.
void sp::audio::OpenALSound::stop | ( | ) | [virtual] |
Stops playing the sound.
Reimplemented from sp::audio::Sound.
bool sp::audio::OpenALSound::valid | ( | ) | const [virtual] |
Returns true if the object is a valid sound. Otherwise no sound file has been loaded or could not load.
Implements sp::audio::Sound.