Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Sound Class Reference

#include <sound.h>

List of all members.

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


Constructor & Destructor Documentation

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.

Parameters:
filename the file that is loaded
fadeIn is a time in milliseconds

Definition at line 371 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 383 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 496 of file sound.cpp.

References Sound_InternalData::mainsample, Sound_InternalData::mainwave, Sound_FreeSample(), Sound_InternalData::startsample, Sound_InternalData::startwave, and stop().


Member Function Documentation

void Sound::fadeOut int  ms  ) 
 

Definition at line 487 of file sound.cpp.

Referenced by SoundLoopManager::fadeOut().

bool Sound::load  ) 
 

void Sound::play void   ) 
 

Definition at line 440 of file sound.cpp.

References SoundSystem::areEffectsMuted(), SoundSystem_InternalData::channel, SoundSystem::internalData, and Sound_InternalData::mainwave.

Referenced by main(), PG_MapDisplay::playPositionalSound(), and SoundList::playSound().

void Sound::playLoop  ) 
 

Definition at line 449 of file sound.cpp.

References SoundSystem::areEffectsMuted(), SoundSystem_InternalData::channel, SoundSystem::internalData, and Sound_InternalData::mainwave.

Referenced by SoundLoopManager::activate(), and SoundList::playSound().

void Sound::playWait void   ) 
 

Definition at line 466 of file sound.cpp.

References SoundSystem::areEffectsMuted(), SoundSystem_InternalData::channel, SoundSystem::internalData, Sound_InternalData::mainwave, Sound_InternalData::startwave, and WAIT_SLEEP_MSEC.

void Sound::stop  ) 
 

Definition at line 458 of file sound.cpp.

Referenced by ~Sound(), and SoundLoopManager::~SoundLoopManager().


Friends And Related Function Documentation

friend class SoundSystem [friend]
 

Definition at line 42 of file sound.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:20:53 2008 for Advanced Strategic Command by  doxygen 1.4.2