summaryrefslogtreecommitdiffhomepage
path: root/MIDIPlayer.cpp
diff options
context:
space:
mode:
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();