diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-19 21:03:06 +0000 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-19 21:03:06 +0000 |
commit | 892888da03028cbf67bf005747902b9e3e5b9773 (patch) | |
tree | a5fd97f9c07c4d08a343e47d0ba2e68f4b5d296e /AudioPlayer.h | |
parent | 7f54b359f0261ae5b70f303a2080b13dd70cd0c2 (diff) |
Play WAV
Diffstat (limited to 'AudioPlayer.h')
-rw-r--r-- | AudioPlayer.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/AudioPlayer.h b/AudioPlayer.h new file mode 100644 index 0000000..7f9c180 --- /dev/null +++ b/AudioPlayer.h @@ -0,0 +1,22 @@ +#pragma once + +#include <boost/process.hpp> + +#include <filesystem> + +class AudioPlayer +{ +public: + AudioPlayer(const std::filesystem::path& dir, const std::string& filename); + + void start(); + + void stop(); + + void set_file(const std::string& filename); + +private: + std::filesystem::path m_dir; + std::string m_file; + boost::process::child m_child_audioplayer; +}; |