#pragma once #include #include #include #include #include "config.h" #include class MIDIPlayer { public: MIDIPlayer(Config& config); void start(); void stop(); bool is_playing(); void set_file(const std::string& filename); std::string get_file(); std::vector get_filelist(); int get_midi_port(); private: void init_seq(void); void close_seq(void); void iterate_ports(void); Config& m_config; boost::process::child m_child; std::filesystem::path m_dir; std::string m_file; snd_seq_t* m_seq; int m_client; };