#ifndef XTLITE_ENGINE_H #define XTLITE_ENGINE_H #include "xtlite_types.h" #ifdef __cplusplus extern "C" { #endif typedef struct xt_graph xt_graph; typedef enum { XT_SIGNAL_AUDIO = 1, XT_SIGNAL_EVENT = 2, XT_SIGNAL_CONTROL = 3 } xt_signal_type; typedef enum { XT_PORT_INPUT = 1, XT_PORT_OUTPUT = 2 } xt_port_direction; typedef struct { float *samples; size_t frame_count; size_t channel_count; } xt_audio_buffer; /* Graph API is intentionally small in this first scaffold. */ xt_result xt_graph_create(size_t max_nodes, xt_graph **out_graph); void xt_graph_destroy(xt_graph *graph); xt_result xt_graph_add_gain(xt_graph *graph, float gain, size_t *out_node_id); xt_result xt_graph_connect(xt_graph *graph, size_t source_node, size_t destination_node); xt_result xt_graph_validate(const xt_graph *graph); xt_result xt_graph_process_offline(xt_graph *graph, const float *input, float *output, size_t frame_count, float input_gain); #ifdef __cplusplus } #endif #endif