2024-10-09 02:01:23 +02:00
|
|
|
#pragma once
|
|
|
|
|
#include <libremidi/config.hpp>
|
|
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
#include <functional>
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
typedef struct _jack_client jack_client_t;
|
|
|
|
|
typedef uint32_t jack_nframes_t;
|
|
|
|
|
typedef int (*JackProcessCallback)(jack_nframes_t nframes, void* arg);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-23 00:05:41 +02:00
|
|
|
NAMESPACE_LIBREMIDI
|
2024-10-09 02:01:23 +02:00
|
|
|
{
|
|
|
|
|
using jack_callback_function = std::function<void(int nframes)>;
|
|
|
|
|
struct jack_callback
|
|
|
|
|
{
|
|
|
|
|
int64_t token;
|
|
|
|
|
std::function<void(int nframes)> callback;
|
|
|
|
|
};
|
|
|
|
|
struct jack_input_configuration
|
|
|
|
|
{
|
|
|
|
|
std::string client_name = "libremidi client";
|
|
|
|
|
|
|
|
|
|
jack_client_t* context{};
|
2024-10-28 19:24:18 +01:00
|
|
|
std::function<void(jack_callback)> set_process_func{};
|
|
|
|
|
std::function<void(int64_t)> clear_process_func{};
|
2024-10-09 02:01:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct jack_output_configuration
|
|
|
|
|
{
|
|
|
|
|
std::string client_name = "libremidi client";
|
|
|
|
|
|
|
|
|
|
jack_client_t* context{};
|
2024-10-28 19:24:18 +01:00
|
|
|
std::function<void(jack_callback)> set_process_func{};
|
|
|
|
|
std::function<void(int64_t)> clear_process_func{};
|
2024-10-09 02:01:23 +02:00
|
|
|
|
|
|
|
|
int32_t ringbuffer_size = 16384;
|
|
|
|
|
bool direct = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct jack_observer_configuration
|
|
|
|
|
{
|
|
|
|
|
std::string client_name = "libremidi client";
|
|
|
|
|
jack_client_t* context{};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|