/* * Sound.h * * Created on: Aug 2, 2018 * Author: Andreas Schneider, Johannes Wendel, Jonas Zeunert */ #ifndef _SRC_OUTPUT_SOUND_H_ #define _SRC_OUTPUT_SOUND_H_ #include "output/items/ISound.h" #include "ISoundItem.h" #include "Item.h" #include #include #include #include namespace flippR_driver { namespace output { namespace items { class Sound : public ISound, Item, ISoundItem { public: u_int id; public: Sound(std::shared_ptr output_gpio_interface, uint8_t address, std::string name, std::chrono::milliseconds deactivation_time, u_int id); virtual ~Sound() = default; virtual void play(); private: std::chrono::milliseconds deactivation_time; std::future play_task; private: virtual void playTask(); }; } } /* namespace output */ } #endif