From 892888da03028cbf67bf005747902b9e3e5b9773 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 19 Jan 2025 21:03:06 +0000 Subject: Play WAV --- AudioPlayer.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 AudioPlayer.h (limited to 'AudioPlayer.h') 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 + +#include + +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; +}; -- cgit v1.2.3