home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / temacd / planearcade / planearcade.exe / Tank3.bmp / sound.h < prev    next >
C/C++ Source or Header  |  2004-10-23  |  1KB  |  64 lines

  1.  
  2. #ifndef _SOUND_H_
  3. #define _SOUND_H_
  4.  
  5.  
  6. //-----------------------------------------
  7. //Public variables
  8. //-----------------------------------------
  9. extern ALCcontext *Context;
  10. extern ALCdevice  *Device;
  11.  
  12. //-----------------------------------------
  13. //Public funtions
  14. //-----------------------------------------
  15. void InitializeSound();
  16. void CleanUpSound();
  17.  
  18.  
  19. //------------------------------------------------------------------
  20. // Name: SOUND CLASS
  21. // Desc: ***********
  22. //------------------------------------------------------------------
  23. class SOUND
  24. {
  25.  
  26. private:
  27.     enum Format {Unknown, MP3, WavMidi,WavMidi3D};
  28.  
  29.  
  30.     //MP3
  31.     IGraphBuilder* m_pGraph;
  32.     IMediaControl* m_pMediaControl;
  33.     IMediaPosition* m_pMediaPosition;
  34.  
  35.     //Wav3D
  36.     char*            alBuffer;
  37.     ALenum        alFormatBuffer;
  38.     ALsizei        alFreqBuffer;
  39.     long            alBufferLen;
  40.     unsigned int    alSource;
  41.     unsigned int    alSampleSet;
  42.  
  43.     Format m_enumFormat;
  44.  
  45. public:
  46.  
  47.  
  48.     bool Stop();
  49.     bool Play(bool Loop = false);
  50.     void SetPosition(VECTOR3D Point,float Scale);
  51.     bool LoadSound(char* szSoundFilePath);
  52.     void InitialiseForWavMidi();
  53.     void InitialiseForWavMidi3D();
  54.     void InitialiseForMP3();
  55.     
  56.     SOUND();                
  57.     virtual ~SOUND();
  58.  
  59. };
  60.  
  61.  
  62.  
  63.  
  64. #endif //_SOUND_H_