From bb56941f6b61529dd770475296d093727c68fdc6 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Fri, 17 Jan 2025 21:02:51 +0100 Subject: Automatically use correct files path (executable path or /media/usb) --- MIDIPlayer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'MIDIPlayer.cpp') 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 #include @@ -16,12 +18,13 @@ namespace fs = std::filesystem; using namespace std::chrono_literals; namespace { - std::unordered_set supported_devices{"AudioBox 22 VSL", "CH345"}; + std::unordered_set 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 list = get_filelist(); -- cgit v1.2.3