AudioController.h 970 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef AUDIOCONTROLLER_H_
  2. #define AUDIOCONTROLLER_H_
  3. namespace gameplay
  4. {
  5. class AudioListener;
  6. class AudioSource;
  7. /**
  8. * Defines a class for controlling game audio.
  9. */
  10. class AudioController
  11. {
  12. friend class Game;
  13. friend class AudioSource;
  14. public:
  15. /**
  16. * Destructor.
  17. */
  18. virtual ~AudioController();
  19. private:
  20. /**
  21. * Constructor.
  22. */
  23. AudioController();
  24. /**
  25. * Controller initialize.
  26. */
  27. void initialize();
  28. /**
  29. * Controller finalize.
  30. */
  31. void finalize();
  32. /**
  33. * Controller pause.
  34. */
  35. void pause();
  36. /**
  37. * Controller resume.
  38. */
  39. void resume();
  40. /**
  41. * Controller update.
  42. */
  43. void update(long elapsedTime);
  44. ALCdevice* _alcDevice;
  45. ALCcontext* _alcContext;
  46. static std::list<AudioSource*> _playingSources; // List of currently running sources.
  47. };
  48. }
  49. #endif