Guiliani  Version 2.6 revision 7293 (documentation build 12)
CSndWrapLinux Class Referenceabstract

This class is the base implementation for playing WAV files using low-level interfaces. More...

#include <SndWrapLinux.h>

Inheritance diagram for CSndWrapLinux:

Classes

class  CPlayThreadBase
 This class handles the playing of sound files. More...
 
class  CSound
 This class represents a sound file with filepointer, WAVE header and Sound Resource ID. More...
 

Public Member Functions

virtual eC_UByte GetVolume ()=0
 
virtual eC_Bool IsSoundPlaying (const SoundResource_t &eID)
 
virtual void LoadSnd (const eC_String &pkPath, const SoundResource_t &eID, eC_UInt uiDeviceID=0)
 
virtual eC_Bool PauseSnd (const SoundResource_t &eID)
 
virtual eC_Bool PlaySnd (const SoundResource_t &eID, eC_UInt Flags=PLAY_ASYNC)
 
virtual eC_Bool ResumeSnd (const SoundResource_t &eID)
 
virtual eC_Bool SetVolume (eC_UByte ubVolume=0xff)=0
 
virtual eC_Bool StopSnd (const SoundResource_t &eID)
 
virtual void UnloadSnd (const SoundResource_t &eID)
 
- Public Member Functions inherited from CSndWrap
virtual eC_UInt GetNOFSounds ()
 
virtual eC_UByte GetVolume ()=0
 
virtual eC_Bool PauseSnd (const SoundResource_t &eID)=0
 
virtual eC_Bool PlaySnd (const SoundResource_t &eID, eC_UInt uiFlags=2)=0
 
virtual eC_Bool ResumeSnd (const SoundResource_t &eID)=0
 
virtual eC_Bool SetVolume (eC_UByte ubVolume)=0
 
virtual eC_Bool StopSnd (const SoundResource_t &eID)=0
 

Protected Member Functions

 CSndWrapLinux ()
 Constructor.
 
virtual ~CSndWrapLinux ()
 Destructor.
 
- Protected Member Functions inherited from CSndWrap
 CSndWrap ()
 Constructor.
 
 CSndWrap (const CSndWrap &kSource)
 
virtual ~CSndWrap ()
 Destructor.
 
virtual void LoadSnd (const eC_String &kPath, const SoundResource_t &eID, eC_UInt uiDeviceID=0)=0
 
CSndWrapoperator= (const CSndWrap &kSource)
 
virtual eC_Bool SetNOFSounds (eC_UInt uiNOFSounds)
 
virtual void UnloadSnd (const SoundResource_t &eID)=0
 

Protected Attributes

eC_TArray< CSoundm_aSoundFiles
 The list of the loaded soundfiles.
 
CPlayThreadBasem_pPlayThread
 The play thread.
 
- Protected Attributes inherited from CSndWrap
eC_UInt m_uiNOFSounds
 total number of sound-objects.
 

Additional Inherited Members

- Static Public Member Functions inherited from CSndWrap
static void DeleteInstance ()
 Deletes the Sound-Wrapper instance.
 

Detailed Description

This class is the base implementation for playing WAV files using low-level interfaces.

This class is the base implementation for the SndWrapALSA and SndWrapOSS. It opens a WAV file and parses its header for storing the values inside attributes.

Member Function Documentation

◆ GetVolume()

virtual eC_UByte CSndWrapLinux::GetVolume ( )
pure virtual

Method to get the volume of an output device. The volume has to be implemented in percent. The range is from 0 till 100.

Returns
The currently set volume in percent.

Implements CSndWrap.

Implemented in CSndWrapALSA, and CSndWrapOSS.

◆ IsSoundPlaying()

virtual eC_Bool CSndWrapLinux::IsSoundPlaying ( const SoundResource_t eID)
virtual

Tests if there is a sound currently playing

Parameters
eIDThe sound resource to test for
Returns
True if playing, False otherwise

◆ LoadSnd()

virtual void CSndWrapLinux::LoadSnd ( const eC_String &  kPath,
const SoundResource_t eID,
eC_UInt  uiDeviceID = 0 
)
virtual

Method to load a sound file.

Parameters
kPathPath to the sound file.
eIDID of the sound.
uiDeviceIDTBD

Implements CSndWrap.

◆ PauseSnd()

virtual eC_Bool CSndWrapLinux::PauseSnd ( const SoundResource_t eID)
virtual

Method to break playback on a specified sound.

Parameters
eIDID of the sound you want to pause.
Returns
False on error.

Implements CSndWrap.

◆ PlaySnd()

virtual eC_Bool CSndWrapLinux::PlaySnd ( const SoundResource_t eID,
eC_UInt  uiFlags = PLAY_ASYNC 
)
virtual

Method to send data to the specified output device.

Parameters
eIDID of the sound you want to play.
uiFlagsFlags to set for playing. possible flags: PLAY_SYNC - wait until playback has finished before returning PLAY_ASYNC - return immediately to calling function PLAY_WAIT - if a sound is currently playing, wait for the playing sound to end, then play the new sound PLAY_DISCARD - if a sound is currently playing, return without playing the new sound PLAY_IMMEDIATELY - if a sound is currently playing, immediately stop playback and play the new sound
Returns
False on error.

Implements CSndWrap.

◆ ResumeSnd()

virtual eC_Bool CSndWrapLinux::ResumeSnd ( const SoundResource_t eID)
virtual

Method for continuing the playback of a specified sound.

Parameters
eIDID of the sound you want to resume.
Returns
False on error.

Implements CSndWrap.

◆ SetVolume()

virtual eC_Bool CSndWrapLinux::SetVolume ( eC_UByte  ubVolume = 0xff)
pure virtual

Method to set the volume of an output device. The volume has to be implemented in percent. The range is from 0 till 100.

Parameters
ubVolumeto set in percent.
Returns
False on error.

Implements CSndWrap.

Implemented in CSndWrapALSA, and CSndWrapOSS.

◆ StopSnd()

virtual eC_Bool CSndWrapLinux::StopSnd ( const SoundResource_t eID)
virtual

Method to stop playback of a specified sound.

Parameters
eIDID of the sound you want to stop.
Returns
False on error.

Implements CSndWrap.

◆ UnloadSnd()

virtual void CSndWrapLinux::UnloadSnd ( const SoundResource_t eID)
virtual

Method to unload a sound file.

Parameters
eIDID of the sound to unload.

Implements CSndWrap.

Reimplemented in CSndWrapOSS.


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