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

OSS implementation of the Sound Wrapper. More...

#include <SndWrapOSS.h>

Inheritance diagram for CSndWrapOSS:

Public Member Functions

eC_UByte GetVolume ()
 
eC_Bool SetVolume (eC_UByte ubVolume=0xff)
 
void UnloadSnd (const SoundResource_t &eID)
 
- 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_String &kDevicePath="/dev/dsp", 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

 CSndWrapOSS (const eC_String &kDevicePath, 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

OSS implementation of the Sound Wrapper.

This wrapper reads the header of a wav file, then it tries to set the values and simply writes to the dsp device.

Constructor & Destructor Documentation

◆ CSndWrapOSS()

CSndWrapOSS::CSndWrapOSS ( const eC_String &  kDevicePath,
const eC_UInt  uiStackSize,
const ThreadPriority_t  kThreadPriority 
)
protected

Constructor

Parameters
kDevicePathThe dsp device path.
uiStackSizeThe play sound thread stack size.
kThreadPriorityThe play sound thread priority.

Member Function Documentation

◆ CreateInstance()

static void CSndWrapOSS::CreateInstance ( const eC_String &  kDevicePath = "/dev/dsp",
const eC_UInt  uiStackSize = 100,
const ThreadPriority_t  kThreadPriority = GUITHREAD_PRIORITY_NOT_SET 
)
static

Creates the OSS sound wrapper instance.

Parameters
kDevicePathThe dsp device path.
uiStackSizeThe play sound thread stack size.
kThreadPriorityThe play sound thread priority.

◆ GetVolume()

eC_UByte CSndWrapOSS::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 CSndWrapOSS::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.

◆ UnloadSnd()

void CSndWrapOSS::UnloadSnd ( const SoundResource_t eID)
virtual

Method to unload a sound file.

Parameters
eIDID of the sound to unload.

Reimplemented from CSndWrapLinux.


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