#pragma once #include #include #include #include #include #include class AudioPlayer { public: AudioPlayer(); ~AudioPlayer(); bool playFromSoundsDir(const std::string& filename); void stop(); bool isPlaying() const; private: ALCdevice* device; ALCcontext* context; ALuint source; ALuint buffer; bool playing; std::vector loadOgg(const std::string& filename); std::string findFileInSounds(const std::string& filename); bool isOggFile(const std::string& filename) const; };