diff options
Diffstat (limited to 'MIDIPlayer.cpp')
-rw-r--r-- | MIDIPlayer.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MIDIPlayer.cpp b/MIDIPlayer.cpp index 8202850..061b8f6 100644 --- a/MIDIPlayer.cpp +++ b/MIDIPlayer.cpp @@ -11,6 +11,7 @@ #include <string> #include <thread> #include <unordered_set> +#include <stdexcept> 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"); + } } } |