From 321eaa65109a6ab18344901dfc4dd8cc4b82367d Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sun, 19 Jan 2025 15:36:24 +0100 Subject: Add clock --- MIDIPlayer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'MIDIPlayer.cpp') diff --git a/MIDIPlayer.cpp b/MIDIPlayer.cpp index 8202850..061b8f6 100644 --- a/MIDIPlayer.cpp +++ b/MIDIPlayer.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace bp = boost::process; namespace fs = std::filesystem; @@ -43,7 +44,10 @@ void MIDIPlayer::start() if (m_child.valid() && m_child.running()) { stop(); } else { - m_child = bp::child(fmt::format("aplaymidi -p{} \"{}\"", m_client, m_file).c_str());//, bp::std_out > bp::null); + m_child = bp::child(fmt::format("/home/ernie/code/midiplay/aplaymidi-mp -c -p{} \"{}\"", m_client, m_file).c_str());//, bp::std_out > bp::null); + if (!m_child.valid() || !m_child.running()) { + throw std::runtime_error("aplaymidi not started"); + } } } -- cgit v1.2.3