summaryrefslogtreecommitdiffhomepage
path: root/MIDIPlayer.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-17 21:02:51 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-17 21:02:51 +0100
commitbb56941f6b61529dd770475296d093727c68fdc6 (patch)
tree065c61ef71a00d0759afcdc0316150db278a7efd /MIDIPlayer.cpp
parent22ed919b2fffa933c8a72763fda2b603a92a18cf (diff)
Automatically use correct files path (executable path or /media/usb)
Diffstat (limited to 'MIDIPlayer.cpp')
-rw-r--r--MIDIPlayer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/MIDIPlayer.cpp b/MIDIPlayer.cpp
index 2c0bc6a..8202850 100644
--- a/MIDIPlayer.cpp
+++ b/MIDIPlayer.cpp
@@ -1,5 +1,7 @@
#include "MIDIPlayer.h"
+#include "config.h"
+
#include <signal.h>
#include <fmt/format.h>
@@ -16,12 +18,13 @@ namespace fs = std::filesystem;
using namespace std::chrono_literals;
namespace {
- std::unordered_set<std::string> supported_devices{"AudioBox 22 VSL", "CH345"};
+ std::unordered_set<std::string> supported_devices{"AudioBox 22 VSL", "CH345", "M2"};
}
-MIDIPlayer::MIDIPlayer(const std::filesystem::path& path):
+MIDIPlayer::MIDIPlayer(Config& config):
+ m_config(config),
m_child{},
- m_dir{path},
+ m_dir{m_config.get_file_path()},
m_file{}
{
std::vector<std::string> list = get_filelist();