Guiliani  Version 2.5 revision 7293 (documentation build 13)
SndWrapSDL.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 SNDWRAPSDL__H_
11#define SNDWRAPSDL__H_
12
13#include "SndWrap.h"
14
15class Mix_Chunk;
16
17
19
21{
22public:
24 static void CreateInstance();
25
29 eC_Bool DeInit (void);
30
34 eC_Bool Init(void);
35
36 void LoadSnd (const eC_String &pkPath, const SoundResource_t &eID, eC_UInt uiDeviceID = 0);
37 void UnloadSnd (const SoundResource_t &eID);
38 eC_Bool SetVolume(eC_UByte ubVolume);
39 eC_UByte GetVolume();
40 eC_Bool PauseSnd (const SoundResource_t &eID);
41 eC_Bool PlaySnd (const SoundResource_t &eID, eC_UInt Flags = PLAY_ASYNC);
42 eC_Bool ResumeSnd (const SoundResource_t &eID);
43 eC_Bool StopSnd (const SoundResource_t &eID);
44
45protected:
46 CSndWrapSDL (void);
47 ~CSndWrapSDL (void);
48
49private:
50 eC_TArray<eC_Int> m_iChannel;//-1 if the chunk is not playing, else the channel it plays on
51 eC_TArray<Mix_Chunk*> m_pSound;//an array of audio data chunks, one for each ID
52
53 eC_Bool SetNOFSounds(eC_UInt uiNOFSounds);
54};
55
56#endif
SoundResource_t
List of sound resource ids.
Definition: GUISoundResource.h:48
This is the Sound-Wrapper base class.
Definition: SndWrap.h:48
This is the Linux implementation of the Sound Wrapper.
Definition: SndWrapSDL.h:21
eC_Bool StopSnd(const SoundResource_t &eID)
eC_Bool Init(void)
eC_Bool ResumeSnd(const SoundResource_t &eID)
static void CreateInstance()
Constructor.
void LoadSnd(const eC_String &pkPath, const SoundResource_t &eID, eC_UInt uiDeviceID=0)
eC_Bool PlaySnd(const SoundResource_t &eID, eC_UInt Flags=PLAY_ASYNC)
eC_Bool DeInit(void)
void UnloadSnd(const SoundResource_t &eID)
eC_Bool PauseSnd(const SoundResource_t &eID)
eC_UByte GetVolume()
eC_Bool SetVolume(eC_UByte ubVolume)