Advanced Strategic Command
Public Member Functions | Friends | List of all members
Sound Class Reference

#include <sound.h>

Public Member Functions

 Sound (const ASCString &filename, int fadeIn=0)
 Create a Sound from the .wav file specified by filename. More...
 
 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
filenamethe file that is loaded
fadeInis a time in milliseconds

Definition at line 384 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 
)
Sound::~Sound ( void  )

Member Function Documentation

void Sound::fadeOut ( int  ms)

Definition at line 501 of file sound.cpp.

Referenced by SoundLoopManager::fadeOut().

bool Sound::load ( )
void Sound::play ( void  )
void Sound::playLoop ( )
void Sound::playWait ( void  )
void Sound::stop ( )

Definition at line 471 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: