summaryrefslogtreecommitdiffhomepage
path: root/MIDIPlayer.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-19 15:36:24 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-19 15:36:24 +0100
commit321eaa65109a6ab18344901dfc4dd8cc4b82367d (patch)
tree238be56f2cac60dc1c8cdc1598adc855ed323bd7 /MIDIPlayer.cpp
parentdf1a250beb787e54f81518d2786d78d654f082ba (diff)
Add clock
Diffstat (limited to 'MIDIPlayer.cpp')
-rw-r--r--MIDIPlayer.cpp6
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");
+ }
}
}