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


Detailed Description

Definition at line 20 of file sound.h.


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 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().


Member Function Documentation

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  ) 

Definition at line 493 of file sound.cpp.

Referenced by SoundLoopManager::fadeOut().

bool Sound::load (  ) 


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 Mon May 21 01:47:30 2012 for Advanced Strategic Command by  doxygen 1.5.1