indentation/alignment
This commit is contained in:
parent
f1a8552f45
commit
8dccc52b08
@ -18,17 +18,17 @@
|
|||||||
* File author: Stefano D'Angelo
|
* File author: Stefano D'Angelo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "input").reduce((s, x) => s += x.channels == "mono" ? 1 : 2, 0)}}
|
#define DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "input").reduce((s, x) => s += x.channels == "mono" ? 1 : 2, 0)}}
|
||||||
#define DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "output").reduce((s, x) => s += x.channels == "mono" ? 1 : 2, 0)}}
|
#define DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N {{=it.product.buses.filter(x => x.type == "audio" && x.direction == "output").reduce((s, x) => s += x.channels == "mono" ? 1 : 2, 0)}}
|
||||||
#define DATA_PRODUCT_MIDI_INPUTS_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length}}
|
#define DATA_PRODUCT_MIDI_INPUTS_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "input").length}}
|
||||||
#define DATA_PRODUCT_MIDI_OUTPUTS_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "output").length}}
|
#define DATA_PRODUCT_MIDI_OUTPUTS_N {{=it.product.buses.filter(x => x.type == "midi" && x.direction == "output").length}}
|
||||||
#define DATA_PRODUCT_PARAMETERS_N {{=it.product.parameters.length}}
|
#define DATA_PRODUCT_PARAMETERS_N {{=it.product.parameters.length}}
|
||||||
#define DATA_PRODUCT_PARAMETERS_OUTPUT_N {{=it.product.parameters.filter(x => x.direction == "output").length}}
|
#define DATA_PRODUCT_PARAMETERS_OUTPUT_N {{=it.product.parameters.filter(x => x.direction == "output").length}}
|
||||||
|
|
||||||
#if DATA_PRODUCT_PARAMETERS_N > 0
|
#if DATA_PRODUCT_PARAMETERS_N > 0
|
||||||
static struct {
|
static struct {
|
||||||
char out;
|
char out;
|
||||||
float def;
|
float def;
|
||||||
} param_data[DATA_PRODUCT_PARAMETERS_N] = {
|
} param_data[DATA_PRODUCT_PARAMETERS_N] = {
|
||||||
{{~it.product.parameters :p}}
|
{{~it.product.parameters :p}}
|
||||||
{
|
{
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
void * handle;
|
void *handle;
|
||||||
const char * format;
|
const char *format;
|
||||||
const char * (*get_bindir)(void *handle);
|
const char *(*get_bindir)(void *handle);
|
||||||
const char * (*get_datadir)(void *handle);
|
const char *(*get_datadir)(void *handle);
|
||||||
} plugin_callbacks;
|
} plugin_callbacks;
|
||||||
|
|
||||||
#include "data.h"
|
#include "data.h"
|
||||||
@ -35,19 +35,19 @@ typedef struct {
|
|||||||
#include "walloc.h"
|
#include "walloc.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
plugin p;
|
plugin p;
|
||||||
void * mem;
|
void *mem;
|
||||||
#if DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N > 0
|
#if DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N > 0
|
||||||
float x_buf[DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N * 128];
|
float x_buf[DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N * 128];
|
||||||
const float * x[DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N];
|
const float *x[DATA_PRODUCT_AUDIO_INPUT_CHANNELS_N];
|
||||||
float zero_buf[128];
|
float zero_buf[128];
|
||||||
#endif
|
#endif
|
||||||
#if DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N > 0
|
#if DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N > 0
|
||||||
float y_buf[DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N * 128];
|
float y_buf[DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N * 128];
|
||||||
float * y[DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N];
|
float *y[DATA_PRODUCT_AUDIO_OUTPUT_CHANNELS_N];
|
||||||
#endif
|
#endif
|
||||||
#if DATA_PRODUCT_PARAMETERS_OUTPUT_N > 0
|
#if DATA_PRODUCT_PARAMETERS_OUTPUT_N > 0
|
||||||
float out_params[DATA_PRODUCT_PARAMETERS_OUTPUT_N];
|
float out_params[DATA_PRODUCT_PARAMETERS_OUTPUT_N];
|
||||||
#endif
|
#endif
|
||||||
} instance;
|
} instance;
|
||||||
|
|
||||||
@ -57,10 +57,10 @@ instance * processor_new(float sample_rate) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
plugin_callbacks cbs = {
|
plugin_callbacks cbs = {
|
||||||
/* .handle = */ NULL,
|
/* .handle = */ NULL,
|
||||||
/* .format = */ "web",
|
/* .format = */ "web",
|
||||||
/* .get_bindir = */ NULL,
|
/* .get_bindir = */ NULL,
|
||||||
/* .get_datadir = */ NULL
|
/* .get_datadir = */ NULL
|
||||||
};
|
};
|
||||||
plugin_init(&i->p, &cbs);
|
plugin_init(&i->p, &cbs);
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
* File author: Stefano D'Angelo
|
* File author: Stefano D'Angelo
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var buses = {{=JSON.stringify(it.product.buses, null, 2)}};
|
var buses = {{=JSON.stringify(it.product.buses, null, 2)}};
|
||||||
var parameters = {{=JSON.stringify(it.product.parameters, null, 2)}};
|
var parameters = {{=JSON.stringify(it.product.parameters, null, 2)}};
|
||||||
|
|
||||||
var busesIn = buses.filter(x => x.type == "audio" && x.direction == "input");
|
var busesIn = buses.filter(x => x.type == "audio" && x.direction == "input");
|
||||||
var busesOut = buses.filter(x => x.type == "audio" && x.direction == "output");
|
var busesOut = buses.filter(x => x.type == "audio" && x.direction == "output");
|
||||||
|
|
||||||
var nChansIn = busesIn.reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0);
|
var nChansIn = busesIn.reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0);
|
||||||
var nChansOut = busesOut.reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0);
|
var nChansOut = busesOut.reduce((a, x) => a + (x.channels == "mono" ? 1 : 2), 0);
|
||||||
|
|
||||||
class Processor extends AudioWorkletProcessor {
|
class Processor extends AudioWorkletProcessor {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
@ -28,7 +28,7 @@ extern unsigned char __heap_base;
|
|||||||
typedef struct _header {
|
typedef struct _header {
|
||||||
struct _header *next;
|
struct _header *next;
|
||||||
struct _header *prev;
|
struct _header *prev;
|
||||||
char free;
|
char free;
|
||||||
} header;
|
} header;
|
||||||
|
|
||||||
static char inited = 0;
|
static char inited = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user