summaryrefslogtreecommitdiffhomepage
path: root/MIDIPlayer.h
blob: e104321d202d17dd4e37017eb7bc645c412e0302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once

#include <string>
#include <vector>

#include <boost/process.hpp>

#include <filesystem>

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<std::string> get_filelist();

private:
  boost::process::child m_child;
  std::filesystem::path m_dir;
  std::string m_file;
};