Guiliani  Version 2.6 revision 7293 (documentation build 12)
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
15#include <SDL.h>
16#include <SDL_mixer.h>
17
19
21{
22public:
24 static void CreateInstance();
25
29 eC_Bool Init(void);
30
34 eC_Bool DeInit (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 struct SoundData_t
51 {
52 eC_Int iChannel;
53 Mix_Chunk* pData;
54 };
55 eC_TArray<SoundData_t> m_akSounds;
56
57 eC_Bool SetNOFSounds(eC_UInt uiNOFSounds);
58};
59
60#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)