sound.h 665 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef WALLENGINE_SOUND_H
  2. #define WALLENGINE_SOUND_H
  3. #include <nlohmann/json.hpp>
  4. #include <irrlicht/irrlicht.h>
  5. #include <SDL_mixer.h>
  6. #include <WallpaperEngine/object3d.h>
  7. #include <WallpaperEngine/object.h>
  8. namespace WallpaperEngine
  9. {
  10. using json = nlohmann::json;
  11. class sound : public WallpaperEngine::object3d
  12. {
  13. public:
  14. sound (json json_data, WallpaperEngine::object* parent);
  15. void play ();
  16. private:
  17. std::vector<std::string> m_filenames;
  18. std::vector <Mix_Music*> m_sdl;
  19. std::vector <SDL_RWops*> m_bufferReader;
  20. std::vector <void*> m_soundBuffer;
  21. };
  22. };
  23. #endif //WALLENGINE_SOUND_H