#include <sound.h>
Public Member Functions | |
| Sound (const ASCString &filename, int fadeIn=0) | |
| Create a Sound from the .wav file specified by filename. | |
| Sound (const ASCString &startSoundFilename, const ASCString &continuousSoundFilename, int fadeIn=0) | |
| void | play (void) |
| void | playWait (void) |
| void | playLoop () |
| void | stop () |
| void | fadeOut (int ms) |
| bool | load () |
| ~Sound (void) | |
Friends | |
| class | SoundSystem |
Definition at line 20 of file sound.h.
| Sound::Sound | ( | const ASCString & | filename, | |
| int | fadeIn = 0 | |||
| ) |
Create a Sound from the .wav file specified by filename.
If it's not possible to use the wave file for some reason, the sound is set to silence.
| filename | the file that is loaded | |
| fadeIn | is a time in milliseconds |
Definition at line 376 of file sound.cpp.
References fatalError(), loadWave(), Sound_InternalData::mainsample, and Sound_InternalData::mainwave.
| Sound::Sound | ( | const ASCString & | startSoundFilename, | |
| const ASCString & | continuousSoundFilename, | |||
| int | fadeIn = 0 | |||
| ) |
Definition at line 388 of file sound.cpp.
References fatalError(), loadWave(), Sound_InternalData::mainsample, Sound_InternalData::mainwave, Sound_InternalData::startsample, and Sound_InternalData::startwave.
| Sound::~Sound | ( | void | ) |
Definition at line 502 of file sound.cpp.
References Sound_InternalData::mainsample, Sound_InternalData::mainwave, Sound_InternalData::startsample, Sound_InternalData::startwave, and stop().
| void Sound::play | ( | void | ) |
Definition at line 445 of file sound.cpp.
References SoundSystem_InternalData::channel, SoundSystem::internalData, and Sound_InternalData::mainwave.
Referenced by main(), PG_MapDisplay::playPositionalSound(), and SoundList::playSound().
| void Sound::playWait | ( | void | ) |
Definition at line 472 of file sound.cpp.
References SoundSystem_InternalData::channel, SoundSystem::internalData, Sound_InternalData::mainwave, Sound_InternalData::startwave, and WAIT_SLEEP_MSEC.
| void Sound::playLoop | ( | ) |
Definition at line 454 of file sound.cpp.
References SoundSystem_InternalData::channel, SoundSystem::internalData, and Sound_InternalData::mainwave.
Referenced by SoundLoopManager::activate(), and SoundList::playSound().
| void Sound::stop | ( | ) |
Definition at line 463 of file sound.cpp.
Referenced by ~Sound(), and SoundLoopManager::~SoundLoopManager().
| void Sound::fadeOut | ( | int | ms | ) |
| bool Sound::load | ( | ) |
friend class SoundSystem [friend] |
1.5.1