Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/sound_engine/src/lib/sound/sound_engine.h @ 3889

Last change on this file since 3889 was 3889, checked in by bensch, 19 years ago

orxonox/branches/sound_engine: sound gets enabled

File size: 1.3 KB
Line 
1/*!
2    \file sound_engine.h
3    \brief Definition of the SoundEngine
4
5    !!AVOID!!:
6    SDL_OpenAudio
7     Use Mix_OpenAudio instead.
8    SDL_CloseAudio
9     Use Mix_CloseAudio instead.
10    SDL_PauseAudio
11     Use Mix_Pause(-1) and Mix_PauseMusic instead, to pause.
12     Use Mix_Resume(-1) and Mix_ResumeMusic instead, to unpause.
13    SDL_LockAudio
14     This is just not needed since SDL_mixer handles this for you.
15     Using it may cause problems as well.
16    SDL_UnlockAudio
17     This is just not needed since SDL_mixer handles this for you.
18     Using it may cause problems as well.
19*/
20
21#ifndef _SOUND_ENGINE_H
22#define _SOUND_ENGINE_H
23
24#include "base_object.h"
25#include <SDL_mixer.h>
26
27#define SOUND_DEFAULT_FREQUENCY 44100
28#define SOUND_DEFAULT_CHANNELS 2
29#define SOUND_DEFAULT_BUFIZE 16384
30
31// FORWARD DEFINITION
32
33//! The Main Sound Engine
34class SoundEngine : public BaseObject {
35
36 public:
37  static SoundEngine* getInstance(void);
38  virtual ~SoundEngine(void);
39
40 private:
41  SoundEngine(void);
42  static SoundEngine* singletonRef;
43
44 
45 
46  void enableSound(void);
47  void disableSound(void);
48  static bool checkVersion(void);
49
50
51  // settings
52  int volume;
53
54  // audio specifications
55  int frequency;
56  Uint16 format;
57  int channels;
58  int bits;
59  int buffers;
60
61  bool isInit;
62};
63
64
65#endif /* _SOUND_ENGINE_H */
Note: See TracBrowser for help on using the repository browser.