#include <spXAudio2Sound.hpp>
Public Member Functions | |
| XAudio2Sound () | |
| ~XAudio2Sound () | |
| 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 | setSeek (f32 Seek) |
| f32 | getSeek () const |
| void | setVolume (f32 Volume) |
| void | setSpeed (f32 Speed) |
| void | setBalance (f32 Balance) |
| 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. | |
| sp::audio::XAudio2Sound::XAudio2Sound | ( | ) |
| sp::audio::XAudio2Sound::~XAudio2Sound | ( | ) |
| void sp::audio::XAudio2Sound::close | ( | ) | [virtual] |
Implements sp::audio::Sound.
| f32 sp::audio::XAudio2Sound::getLength | ( | ) | const [virtual] |
Returns the length of the sound (in seconds).
Implements sp::audio::Sound.
| f32 sp::audio::XAudio2Sound::getSeek | ( | ) | const [virtual] |
Reimplemented from sp::audio::Sound.
| void sp::audio::XAudio2Sound::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::XAudio2Sound::play | ( | ) | [virtual] |
Starts playing the sound. The sound will be played from the beginning.
Reimplemented from sp::audio::Sound.
| bool sp::audio::XAudio2Sound::reload | ( | const io::stringc & | Filename, | |
| u8 | BufferCount = DEF_SOUND_BUFFERCOUNT | |||
| ) | [virtual] |
Implements sp::audio::Sound.
| void sp::audio::XAudio2Sound::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::XAudio2Sound::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::XAudio2Sound::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::XAudio2Sound::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::XAudio2Sound::stop | ( | ) | [virtual] |
Stops playing the sound.
Reimplemented from sp::audio::Sound.
| bool sp::audio::XAudio2Sound::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.
1.7.1