#ifndef _H_AUDIO_ENGINE_H #define _H_AUDIO_ENGINE_H #include #include #include #include #include "utility/events.h" #include "sound/audiostream.h" #include "sound/soundmanager.h" #include "utility/resourcemanager.h" #include "utility/logger.h" class AudioEngine : public std::enable_shared_from_this { public: AudioEngine(std::weak_ptr _resource); void hookEventManager(std::weak_ptr _events); void hookSceneManager(std::weak_ptr _events); void pushMusic(std::string _songName); void playMusic(); void pauseMusic(); void killMusic(); void poll(); void updateListener(const glm::vec3& pos); ~AudioEngine(); private: std::unique_ptr musicPlayer; std::unique_ptr soundManager; std::weak_ptr globalEventManager; std::weak_ptr sceneEventManager; std::weak_ptr resourceManager; ALCdevice *device; ALCcontext *context; }; #endif // _H_AUDIO_ENGINE_H