home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / XenonSource.exe / gamesystem / includes / gs_soundsystem.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-07-19  |  1.2 KB  |  61 lines

  1. //-------------------------------------------------------------
  2. //
  3. // Class:    gsCSoundSystem
  4. //
  5. // Author:    John M Phillips
  6. //
  7. // Started:    12/03/00
  8. //
  9. // Base:    gsCObject
  10. //
  11. // Derived:    None
  12. //
  13. //-------------------------------------------------------------
  14.  
  15. #ifndef _INCLUDE_GS_SOUNDSYSTEM_H
  16. #define _INCLUDE_GS_SOUNDSYSTEM_H
  17.  
  18. #include "gs_list.h"
  19. #include "gs_sample.h"
  20. #include "gs_music.h"
  21.  
  22. //-------------------------------------------------------------
  23.  
  24. class gsCSoundSystem : public gsCObject
  25. {
  26.     private:
  27.         bool m_active;
  28.         gsCList<gsCSample *> m_sample_list;
  29.         gsCList<gsCMusic *> m_music_list;
  30.  
  31.         gsCMusic *m_current_music;
  32.  
  33.     public:
  34.         gsCSoundSystem();
  35.         ~gsCSoundSystem();
  36.  
  37.         bool create();
  38.         bool destroy();
  39.  
  40.         bool isActive();
  41.  
  42.         void clearMusicList();
  43.         bool addMusic(const char *filename);
  44.         int getNumberOfMusics();
  45.         bool playMusic(int index);
  46.         void stopMusic();
  47.         bool isMusicFinished();
  48.  
  49.         void clearSampleList();
  50.         bool addSample(const char *filename);
  51.         int getNumberOfSamples();
  52.         bool playSample(int index,int panning = 0);
  53.         void stopSamples();
  54.  
  55.         void setVolume(int music_percent,int sample_percent);
  56. };
  57.  
  58. //-------------------------------------------------------------
  59.  
  60. #endif
  61.