38 lines
1.0 KiB
C
38 lines
1.0 KiB
C
#ifndef ENGINE_H
|
|
#define ENGINE_H
|
|
|
|
#include <jack/jack.h>
|
|
#include <jack/midiport.h>
|
|
#include <stdbool.h>
|
|
#include "dispatcher.h"
|
|
#include "carla.h"
|
|
|
|
typedef struct {
|
|
jack_client_t *client;
|
|
jack_port_t *audio_in_ports[MAX_CHANNELS];
|
|
jack_port_t *audio_out_ports[MAX_CHANNELS];
|
|
jack_port_t *midi_in_port;
|
|
jack_port_t *midi_scene_in_port;
|
|
jack_port_t *midi_clock_in_port;
|
|
jack_port_t *midi_out_port;
|
|
|
|
DispatchFn dispatch;
|
|
jack_nframes_t sample_rate;
|
|
bool running;
|
|
|
|
CarlaHost carla_host; // Carla host state for plugin management
|
|
|
|
AppState *state; // Pointer to dispatcher's state (for real-time access)
|
|
} Engine;
|
|
|
|
int engine_init(Engine *engine, const char *client_name, DispatchFn dispatch);
|
|
void engine_cleanup(Engine *engine);
|
|
int engine_start(Engine *engine);
|
|
void engine_stop(Engine *engine);
|
|
|
|
const char* clip_state_to_string(ClipState state);
|
|
uint8_t clip_state_to_velocity(ClipState state);
|
|
const char* quantize_mode_to_string(QuantizeMode mode);
|
|
|
|
#endif // ENGINE_H
|