Project refactoring changed xtlite to xtc everywhere.
This commit is contained in:
parent
0578b6243c
commit
71f7b4d96b
16 changed files with 60 additions and 60 deletions
26
include/xtc/xtc.h
Normal file
26
include/xtc/xtc.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef XTC_H
|
||||
#define XTC_H
|
||||
|
||||
#include "xtc_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define XTC_VERSION_MAJOR 0
|
||||
#define XTC_VERSION_MINOR 1
|
||||
#define XTC_VERSION_PATCH 0
|
||||
|
||||
typedef struct xt_app xt_app;
|
||||
|
||||
/* Creates an application context. On success, *out_app is caller-owned. */
|
||||
xt_result xt_app_create(xt_app **out_app);
|
||||
|
||||
/* Destroys an application context; NULL is accepted. */
|
||||
void xt_app_destroy(xt_app *app);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
44
include/xtc/xtc_engine.h
Normal file
44
include/xtc/xtc_engine.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#ifndef XTC_ENGINE_H
|
||||
#define XTC_ENGINE_H
|
||||
|
||||
#include "xtc_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
|
||||
22
include/xtc/xtc_project.h
Normal file
22
include/xtc/xtc_project.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#ifndef XTC_PROJECT_H
|
||||
#define XTC_PROJECT_H
|
||||
|
||||
#include "xtc_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct xt_project xt_project;
|
||||
|
||||
/* Project persistence is not implemented in this scaffold yet. */
|
||||
xt_result xt_project_create(xt_project **out_project);
|
||||
void xt_project_destroy(xt_project *project);
|
||||
xt_result xt_project_save(const xt_project *project, const char *path);
|
||||
xt_result xt_project_load(xt_project *project, const char *path);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
29
include/xtc/xtc_types.h
Normal file
29
include/xtc/xtc_types.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef XTC_TYPES_H
|
||||
#define XTC_TYPES_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
XT_OK = 0,
|
||||
XT_ERR_INVALID_ARGUMENT,
|
||||
XT_ERR_OUT_OF_MEMORY,
|
||||
XT_ERR_NOT_FOUND,
|
||||
XT_ERR_INVALID_STATE,
|
||||
XT_ERR_IO,
|
||||
XT_ERR_UNSUPPORTED,
|
||||
XT_ERR_CAPACITY,
|
||||
XT_ERR_GRAPH_CYCLE
|
||||
} xt_result;
|
||||
|
||||
const char *xt_result_string(xt_result result);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
7
include/xtc/xtc_version.h
Normal file
7
include/xtc/xtc_version.h
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#ifndef XTC_VERSION_H
|
||||
#define XTC_VERSION_H
|
||||
|
||||
#define XTC_VERSION_STRING "0.1.0"
|
||||
#define XTC_PROJECT_NAME "xtc"
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue