/* * Xournal++ * * Class to save audio data in an opus file * * @author Xournal++ Team * https://github.com/xournalpp/xournalpp * * @license GNU GPLv2 or later */ #pragma once #include #include #include #include #include #include "control/settings/Settings.h" #include "AudioQueue.h" #include "DeviceInfo.h" class VorbisConsumer final { public: explicit VorbisConsumer(Settings& settings, AudioQueue& audioQueue): settings(settings), audioQueue(audioQueue) {} public: bool start(const string& filename); void join(); void stop(); private: Settings& settings; AudioQueue& audioQueue; std::thread consumerThread{}; std::atomic stopConsumer{false}; };