/* * Xournal++ * * Class to record audio and store it as MP3-file * * @author Xournal++ Team * https://github.com/xournalpp/xournalpp * * @license GNU GPLv2 or later */ #pragma once #include #include #include #include "control/settings/Settings.h" #include "AudioQueue.h" #include "PortAudioProducer.h" #include "VorbisConsumer.h" #include "XournalType.h" struct AudioRecorder { explicit AudioRecorder(Settings& settings): settings(settings) {} ~AudioRecorder(); bool start(const string& filename); void stop(); bool isRecording() const; vector getInputDevices() const; private: Settings& settings; std::unique_ptr> audioQueue = std::make_unique>(); std::unique_ptr portAudioProducer = std::make_unique(settings, *audioQueue); std::unique_ptr vorbisConsumer = std::make_unique(settings, *audioQueue); };