Guiliani  Version 2.6 revision 7293 (documentation build 12)
CSndWrapALSA Class Reference

ALSA implementation of the Sound Wrapper. More...

#include <SndWrapALSA.h>

Inheritance diagram for CSndWrapALSA:

Public Member Functions

eC_UByte GetVolume ()
 
eC_Bool SetVolume (eC_UByte ubVolume=0xff)
 
- Public Member Functions inherited from CSndWrapLinux
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
 

Static Public Member Functions

static void CreateInstance (const eC_UInt uiNOFPeriods=2, const eC_UInt uiStackSize=100, const ThreadPriority_t kThreadPriority=GUITHREAD_PRIORITY_NOT_SET)
 
- Static Public Member Functions inherited from CSndWrap
static void DeleteInstance ()
 Deletes the Sound-Wrapper instance.
 

Protected Member Functions

 CSndWrapALSA (const eC_UInt uiNOFPeriods, const eC_UInt uiStackSize, const ThreadPriority_t kThreadPriority)
 
- Protected Member Functions inherited from CSndWrapLinux
 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
 

Additional Inherited Members

- Protected Attributes inherited from CSndWrapLinux
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.
 

Detailed Description

ALSA implementation of the Sound Wrapper.

This sound wrapper uses the ALSA API for audio playback. Please note SndWrapALSA can only playback one sound at a time.

Platform Specific Limitations

SndWrapALSA can only playback one sound at a time. Simultaneous playback of several sounds is not possible. (Class CSndWrapALSA)

See CSndWrapALSA Platform Specific Limitations

Constructor & Destructor Documentation

◆ CSndWrapALSA()

CSndWrapALSA::CSndWrapALSA ( const eC_UInt  uiNOFPeriods,
const eC_UInt  uiStackSize,
const ThreadPriority_t  kThreadPriority 
)
protected

Constructor

Parameters
uiNOFPeriodsThe number of periods to set.
uiStackSizeThe play sound thread stack size.
kThreadPriorityThe play sound thread priority.

Member Function Documentation

◆ CreateInstance()

static void CSndWrapALSA::CreateInstance ( const eC_UInt  uiNOFPeriods = 2,
const eC_UInt  uiStackSize = 100,
const ThreadPriority_t  kThreadPriority = GUITHREAD_PRIORITY_NOT_SET 
)
static

Creates the ALSA sound wrapper instance.

Parameters
uiNOFPeriodsThe number of periods to set.
uiStackSizeThe play sound thread stack size.
kThreadPriorityThe play sound thread priority.

◆ GetVolume()

eC_UByte CSndWrapALSA::GetVolume ( )
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 CSndWrapLinux.

◆ SetVolume()

eC_Bool CSndWrapALSA::SetVolume ( eC_UByte  ubVolume = 0xff)
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 CSndWrapLinux.


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