Guiliani  Version 2.5 revision 7293 (documentation build 13)
SndWrapOSS.h
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef __SNDWRAPOSS_H__
11#define __SNDWRAPOSS_H__
12
13#include "SndWrapWAVBase.h"
14
16
20{
21public:
27 static void CreateInstance(const eC_String& kDevicePath = "/dev/dsp", const eC_UInt uiStackSize = 100, const ThreadPriority_t kThreadPriority = GUITHREAD_PRIORITY_NOT_SET);
28 void UnloadSnd(const SoundResource_t &eID);
29 eC_Bool SetVolume(eC_UByte ubVolume = 0xff);
30 eC_UByte GetVolume();
31
32protected:
38 CSndWrapOSS(const eC_String& kDevicePath, const eC_UInt uiStackSize, const ThreadPriority_t kThreadPriority);
39
40private:
41 eC_String m_kDevicePath;
42
44
48 class CPlayThread: public CSndWrapWAVBase::CPlayThreadBase
49 {
50 public:
56 CPlayThread(const eC_String& kDevicePath, const eC_UInt uiStackSize, const ThreadPriority_t kThreadPriority);
57
59 ~CPlayThread();
60
64 void Play(const CSound& kSound);
65
67 void Pause() {}
68
70 void Resume() {}
71
73 void Stop() {}
74
75 private:
79 void Execute(void *pArg);
80
81 eC_String m_kDevicePath;
82 };
83};
84#endif //#ifndef __SNDWRAPOSS_H__
SoundResource_t
List of sound resource ids.
Definition: GUISoundResource.h:48
OSS implementation of the Sound Wrapper.
Definition: SndWrapOSS.h:20
eC_UByte GetVolume()
CSndWrapOSS(const eC_String &kDevicePath, const eC_UInt uiStackSize, const ThreadPriority_t kThreadPriority)
static void CreateInstance(const eC_String &kDevicePath="/dev/dsp", const eC_UInt uiStackSize=100, const ThreadPriority_t kThreadPriority=GUITHREAD_PRIORITY_NOT_SET)
void UnloadSnd(const SoundResource_t &eID)
eC_Bool SetVolume(eC_UByte ubVolume=0xff)
This class handles the playing of sound files.
Definition: SndWrapWAVBase.h:124
This class represents a sound file with filepointer, WAVE header and Sound Resource ID.
Definition: SndWrapWAVBase.h:52
This class is the base implementation for playing WAV files using low-level interfaces.
Definition: SndWrapWAVBase.h:24