gxsound.h 610 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifndef GXSOUND_H
  2. #define GXSOUND_H
  3. #include "gxchannel.h"
  4. class gxAudio;
  5. struct FSOUND_SAMPLE;
  6. class gxSound{
  7. public:
  8. gxAudio *audio;
  9. gxSound( gxAudio *audio,FSOUND_SAMPLE *sample );
  10. ~gxSound();
  11. private:
  12. bool defs_valid;
  13. int def_freq,def_vol,def_pan,def_pri;
  14. FSOUND_SAMPLE *sample;
  15. float pos[3],vel[3];
  16. void setDefaults();
  17. /***** GX INTERFACE *****/
  18. public:
  19. //actions
  20. gxChannel *play();
  21. gxChannel *play3d( const float pos[3],const float vel[3] );
  22. //modifiers
  23. void setLoop( bool loop );
  24. void setPitch( int hertz );
  25. void setVolume( float volume );
  26. void setPan( float pan );
  27. };
  28. #endif