#pragma once #include #include #include #include #include class MIDIPlayer { public: MIDIPlayer(const std::filesystem::path& path = "."); 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); boost::process::child m_child; std::filesystem::path m_dir; std::string m_file; snd_seq_t* m_seq; int m_client; };