Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 19, 2005, 2:20:01 AM (19 years ago)
Author:
bensch
Message:

orxonox/branches/sound_engine: loading unloading should work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/sound_engine/src/lib/sound/sound_engine.h

    r3889 r3890  
    2929#define SOUND_DEFAULT_BUFIZE 16384
    3030
     31// an enumerator of the different Sound Types.
     32typedef 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
    3139// FORWARD DEFINITION
     40
     41class 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
     50class 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
     58class 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};
    3265
    3366//! The Main Sound Engine
     
    3871  virtual ~SoundEngine(void);
    3972
     73
     74  void setNumberOfChannels(unsigned int numberOfChannels);
     75
     76
     77  static bool isInit;
     78  static bool enabled;
    4079 private:
    4180  SoundEngine(void);
    4281  static SoundEngine* singletonRef;
    4382
    44  
    45  
    4683  void enableSound(void);
    4784  void disableSound(void);
     
    5188  // settings
    5289  int volume;
     90  unsigned int numberOfChannels;
    5391
    5492  // audio specifications
     
    5997  int buffers;
    6098
    61   bool isInit;
     99
     100
    62101};
    63102
Note: See TracChangeset for help on using the changeset viewer.