Changeset 3890 in orxonox.OLD for orxonox/branches/sound_engine/src/lib/sound/sound_engine.h
- Timestamp:
- Apr 19, 2005, 2:20:01 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/sound_engine/src/lib/sound/sound_engine.h
r3889 r3890 29 29 #define SOUND_DEFAULT_BUFIZE 16384 30 30 31 // an enumerator of the different Sound Types. 32 typedef enum SOUND_TYPE {SOUND_NONE, 33 SOUND_WAV, /* .wav */ 34 SOUND_MOD, /* .mod .s3m .it .xm */ 35 SOUND_MID, /* mid */ 36 SOUND_OGG, 37 SOUND_MP3}; 38 31 39 // FORWARD DEFINITION 40 41 class Sound { 42 public: 43 Sound(const char* fileName, SOUND_TYPE soundType); 44 virtual ~Sound(void); 45 protected: 46 SOUND_TYPE soundType; 47 int channel; 48 }; 49 50 class SoundEffect : public Sound { 51 public: 52 SoundEffect(const char* fileName, SOUND_TYPE soundType = SOUND_NONE); 53 virtual ~SoundEffect(void); 54 private: 55 Mix_Chunk* effect; 56 }; 57 58 class Music :public Sound { 59 public: 60 Music(const char* fileName, SOUND_TYPE soundType = SOUND_NONE); 61 virtual ~Music(void); 62 private: 63 Mix_Music* music; 64 }; 32 65 33 66 //! The Main Sound Engine … … 38 71 virtual ~SoundEngine(void); 39 72 73 74 void setNumberOfChannels(unsigned int numberOfChannels); 75 76 77 static bool isInit; 78 static bool enabled; 40 79 private: 41 80 SoundEngine(void); 42 81 static SoundEngine* singletonRef; 43 82 44 45 46 83 void enableSound(void); 47 84 void disableSound(void); … … 51 88 // settings 52 89 int volume; 90 unsigned int numberOfChannels; 53 91 54 92 // audio specifications … … 59 97 int buffers; 60 98 61 bool isInit; 99 100 62 101 }; 63 102
Note: See TracChangeset
for help on using the changeset viewer.