#include <spWinMMSound.hpp>
Public Member Functions | |
WinMMSound () | |
~WinMMSound () | |
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. | |
bool | saveRecord (const io::stringc &Filename) |
void | beginRecording () |
Begins to record a sound from an sound-input device (microphone). | |
void | endRecording () |
Finish the recording sound. After recording a sound it can be saved as a wave (WAV) file. |
sp::audio::WinMMSound::WinMMSound | ( | ) |
sp::audio::WinMMSound::~WinMMSound | ( | ) |
void sp::audio::WinMMSound::beginRecording | ( | ) | [virtual] |
Begins to record a sound from an sound-input device (microphone).
Reimplemented from sp::audio::Sound.
void sp::audio::WinMMSound::close | ( | ) | [virtual] |
Implements sp::audio::Sound.
void sp::audio::WinMMSound::endRecording | ( | ) | [virtual] |
Finish the recording sound. After recording a sound it can be saved as a wave (WAV) file.
Reimplemented from sp::audio::Sound.
f32 sp::audio::WinMMSound::getLength | ( | ) | const [virtual] |
Returns the length of the sound (in seconds).
Implements sp::audio::Sound.
f32 sp::audio::WinMMSound::getSeek | ( | ) | const [virtual] |
Reimplemented from sp::audio::Sound.
void sp::audio::WinMMSound::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::WinMMSound::play | ( | ) | [virtual] |
Starts playing the sound. The sound will be played from the beginning.
Reimplemented from sp::audio::Sound.
bool sp::audio::WinMMSound::reload | ( | const io::stringc & | Filename, | |
u8 | BufferCount = DEF_SOUND_BUFFERCOUNT | |||
) | [virtual] |
Implements sp::audio::Sound.
bool sp::audio::WinMMSound::saveRecord | ( | const io::stringc & | Filename | ) | [virtual] |
Saves the record sound as a wave (WAV) file to the disk. A sound needs to be recorded using the "beginRecording" and "endRecording" before this function can be used.
Filename,: | Filename or path where the sound file is to be saved. |
Reimplemented from sp::audio::Sound.
void sp::audio::WinMMSound::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::WinMMSound::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::WinMMSound::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::WinMMSound::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::WinMMSound::stop | ( | ) | [virtual] |
Stops playing the sound.
Reimplemented from sp::audio::Sound.
bool sp::audio::WinMMSound::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.