CSound Class Reference

CSound handles the songs and samples. More...

#include <CSound.h>

List of all members.

Public Member Functions

 CSound (void)
 ~CSound (void)
void SetModuleHandle (HMODULE hModule)
 Set the connection to the resources.
bool Create (void)
 Initialize the object.
void Destroy (void)
 Uninitialize the object.
void SetPause (bool Pause)
 Pause or resume the sound.
bool IsPaused (void)
void PlaySong (ESong Song)
 Start playing a song.
void StopSong (ESong Song)
 Stop playing a specific song.
void PlaySample (ESample Sample)
 Start playing a sample.
void StopAllSamples ()
 Stops all samples.
void SetSampleVolume (int VolumePerCent)
 Set the volume for all samples.
void SetSongVolume (ESong Song, int VolumePerCent)
 Set the volume for a specific song.

Private Member Functions

bool GetSoundResource (int ResourceID, LPVOID &pData, DWORD &DataSize)
bool LoadSample (ESample Sample, int ResourceID)
void FreeSample (ESample Sample)
bool LoadSong (ESong Song, int ResourceID)
void FreeSong (ESong Song)

Private Attributes

HMODULE m_hModule
 Connection to the resources.
bool m_GlobalPause
 Is the sound paused?
bool m_SoundOK
 Could SDL_mixer be initialized? This may be false if there is no sound card.
Mix_Chunk * m_Samples [NUM_SAMPLES]
 The available samples.
Mix_Music * m_CurrentSong
 The current song.
ESong m_ESong
 current song number


Detailed Description

CSound handles the songs and samples.

Constructor & Destructor Documentation

CSound::CSound ( void   ) 

CSound::~CSound ( void   ) 


Member Function Documentation

bool CSound::GetSoundResource ( int  ResourceID,
LPVOID pData,
DWORD DataSize 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

bool CSound::LoadSample ( ESample  Sample,
int  ResourceID 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CSound::FreeSample ( ESample  Sample  )  [private]

bool CSound::LoadSong ( ESong  Song,
int  ResourceID 
) [private]

Here is the call graph for this function:

Here is the caller graph for this function:

void CSound::FreeSong ( ESong  Song  )  [private]

Here is the caller graph for this function:

void CSound::SetModuleHandle ( HMODULE  hModule  )  [inline]

Set the connection to the resources.

Here is the caller graph for this function:

bool CSound::Create ( void   ) 

Initialize the object.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSound::Destroy ( void   ) 

Uninitialize the object.

Here is the caller graph for this function:

void CSound::SetPause ( bool  Pause  ) 

Pause or resume the sound.

Here is the caller graph for this function:

bool CSound::IsPaused ( void   )  [inline]

Here is the caller graph for this function:

void CSound::PlaySong ( ESong  Song  ) 

Start playing a song.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSound::StopSong ( ESong  Song  ) 

Stop playing a specific song.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSound::PlaySample ( ESample  Sample  ) 

Start playing a sample.

void CSound::StopAllSamples (  ) 

Stops all samples.

Here is the caller graph for this function:

void CSound::SetSampleVolume ( int  VolumePerCent  ) 

Set the volume for all samples.

Here is the caller graph for this function:

void CSound::SetSongVolume ( ESong  Song,
int  VolumePerCent 
)

Set the volume for a specific song.

Here is the caller graph for this function:


Member Data Documentation

Connection to the resources.

bool CSound::m_GlobalPause [private]

Is the sound paused?

bool CSound::m_SoundOK [private]

Could SDL_mixer be initialized? This may be false if there is no sound card.

Mix_Chunk* CSound::m_Samples[NUM_SAMPLES] [private]

The available samples.

Mix_Music* CSound::m_CurrentSong [private]

The current song.

current song number


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 12:26:48 2008 for Bombermaaan by  doxygen 1.5.5
Visit the Bombermaaan project page
SourceForge.net Logo