/* * Xournal++ * * Class to read audio data from an mp3 file * * @author Xournal++ Team * https://github.com/xournalpp/xournalpp * * @license GNU GPLv2 or later */ #pragma once #include #include #include #include #include "AudioQueue.h" #include "DeviceInfo.h" struct VorbisProducer final { explicit VorbisProducer(AudioQueue& audioQueue): audioQueue(audioQueue) {} bool start(const std::string& filename, unsigned int timestamp); void abort(); void stop(); void seek(int seconds); private: AudioQueue& audioQueue; std::thread producerThread{}; std::atomic stopProducer{false}; std::atomic seekSeconds{0}; };