10#ifndef __SNDWRAPLINUX_H__
11#define __SNDWRAPLINUX_H__
13#include "WaveLoader.h"
28 virtual eC_Bool
SetVolume(eC_UByte ubVolume = 0xff) = 0;
57 m_eSoundID(SND_START_TAG)
59 memset(&m_kWaveformat, 0,
sizeof(m_kWaveformat));
67 m_kWaveformat = kWaveFormat;
85 const eC_UInt& uiDataSize,
86 const eC_Bool& bAllocated)
97 m_pubData =
new eC_UByte[uiDataSize];
98 memcpy(m_pubData, pubData, uiDataSize);
100 m_uiDataSize = uiDataSize;
101 m_bAllocated = bAllocated;
128 if (m_pubData && m_bAllocated)
138 m_eSoundID = eSoundID;
151 eC_UInt m_uiDataSize;
152 eC_Bool m_bAllocated;
170 m_kThreadPriority(kThreadPriority)
212 virtual void Execute(
void *pArg) = 0;
220 eC_Int Start(
void *pArg);
223 ThreadPriority_t m_kThreadPriority;
239 eC_Bool SetNOFSounds(eC_UInt uiNOFSounds);
SoundResource_t
List of sound resource ids.
Definition: GUISoundResource.h:48
This is the base class for Guiliani threads.
Definition: GUIThread.h:85
This is the Sound-Wrapper base class.
Definition: SndWrap.h:48
This class handles the playing of sound files.
Definition: SndWrapLinux.h:162
virtual void Play(const CSound &kSound)=0
const CSound & GetSound() const
Definition: SndWrapLinux.h:193
const void SetSound(const CSound &kSound)
Definition: SndWrapLinux.h:198
virtual ~CPlayThreadBase()
Destructor.
Definition: SndWrapLinux.h:174
CPlayThreadBase(const eC_UInt uiStackSize, const ThreadPriority_t kThreadPriority)
Definition: SndWrapLinux.h:168
ThreadPriority_t GetThreadPriority() const
Definition: SndWrapLinux.h:203
This class represents a sound file with filepointer, WAVE header and Sound Resource ID.
Definition: SndWrapLinux.h:52
void SetData(eC_UByte *pubData, const eC_UInt &uiDataSize, const eC_Bool &bAllocated)
Definition: SndWrapLinux.h:83
eC_UByte * GetData() const
Definition: SndWrapLinux.h:108
void SetSoundID(const SoundResource_t eSoundID)
Definition: SndWrapLinux.h:136
eC_UInt GetDataSize() const
Definition: SndWrapLinux.h:116
const FileLoader::WaveLoader::FormatChunk_t & GetWaveFormat() const
Definition: SndWrapLinux.h:73
SoundResource_t GetSoundID() const
Definition: SndWrapLinux.h:144
void SetWaveFormat(const FileLoader::WaveLoader::FormatChunk_t &kWaveFormat)
Definition: SndWrapLinux.h:65
void ReleaseData()
Definition: SndWrapLinux.h:126
This class is the base implementation for playing WAV files using low-level interfaces.
Definition: SndWrapLinux.h:24
virtual void LoadSnd(const eC_String &pkPath, const SoundResource_t &eID, eC_UInt uiDeviceID=0)
virtual eC_Bool StopSnd(const SoundResource_t &eID)
virtual void UnloadSnd(const SoundResource_t &eID)
CPlayThreadBase * m_pPlayThread
The play thread.
Definition: SndWrapLinux.h:226
virtual eC_UByte GetVolume()=0
eC_TArray< CSound > m_aSoundFiles
The list of the loaded soundfiles.
Definition: SndWrapLinux.h:227
virtual eC_Bool PauseSnd(const SoundResource_t &eID)
virtual ~CSndWrapLinux()
Destructor.
CSndWrapLinux()
Constructor.
virtual eC_Bool IsSoundPlaying(const SoundResource_t &eID)
virtual eC_Bool SetVolume(eC_UByte ubVolume=0xff)=0
virtual eC_Bool PlaySnd(const SoundResource_t &eID, eC_UInt Flags=PLAY_ASYNC)
virtual eC_Bool ResumeSnd(const SoundResource_t &eID)