#pragma once #include #if __has_include() #include #else extern "C" { typedef struct _snd_seq snd_seq_t; typedef struct snd_seq_event snd_seq_event_t; typedef struct snd_seq_addr { unsigned char client; unsigned char port; } snd_seq_addr_t; } #endif namespace libremidi::alsa_seq { // Possible parameters: // - Direct / non-direct output // - Timer source used (high resolution, etc) // - Timestamping // - Tempo, ppq? struct poll_parameters { snd_seq_addr_t addr{}; std::function callback; }; struct input_configuration { using poll_parameters_type = poll_parameters; std::string client_name = "libremidi client"; snd_seq_t* context{}; std::function manual_poll; std::function stop_poll; static constexpr int midi_version = 1; }; struct output_configuration { std::string client_name = "libremidi client"; snd_seq_t* context{}; static constexpr int midi_version = 1; }; struct observer_configuration { std::string client_name = "libremidi client"; snd_seq_t* context{}; std::function manual_poll; std::function stop_poll; static constexpr int midi_version = 1; }; }