shithub: neindaw

ref: a68874bd0c571dfff06ee6ee3d9b2c5d8c283008
dir: /aux.h/

View raw version
enum {
	Xctl,
	Xmetadata,
	Xclone,
	Xdsp,
	Xdspctl,
	Xdspdata,
	UITGroup,
	UIHGroup,
	UIVGroup,
	UIButton,
	UICheckBox,
	UIVSlider,
	UIHSlider,
	UINEntry,
	UIHBarGraph,
	UIVBarGraph,
	Xuictl,
	Xuimeta,
};

typedef struct Aux Aux;
typedef struct Auxdsp Auxdsp;
typedef struct Meta Meta;
typedef struct UI UI;

struct Auxdsp {
	void *dsp;
	FAUSTFLOAT **in, **out;
	int numin, numout;
	int inmax, outmax;
};

struct Aux {
	int type;
	int id;
	Auxdsp dsp;
	int ctl;
	int data;
	int metadata;
	UI *ui;
};

struct Meta {
	const char *k;
	const char *v;
};

struct UI {
	const char *label;
	FAUSTFLOAT *zone;
	FAUSTFLOAT init;
	FAUSTFLOAT min;
	FAUSTFLOAT max;
	FAUSTFLOAT step;
	char *(*readstr)(Aux *a, UI *ui, int type, char *s, int sz);
	int (*write)(Aux *a, UI *ui, int type, char *s);

	Meta *meta;
	int nummeta;
};