shithub: neindaw

Download patch

ref: 368a207fb0dd648960417b79e41c5f352e16a1c9
parent: fb785323a3088953f80459b04c0c796c527af4ac
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Feb 26 15:44:59 EST 2020

dsp: FAUSTFLOAT -> float

--- a/dsp/aux.h
+++ b/dsp/aux.h
@@ -19,7 +19,7 @@
 
 struct Auxdsp {
 	void *dsp;
-	FAUSTFLOAT **in, **out;
+	float **in, **out;
 	int numin, numout;
 	int inmax, outmax;
 };
@@ -43,11 +43,11 @@
 struct UI {
 	UItype type;
 	const char *label;
-	FAUSTFLOAT *zone;
-	FAUSTFLOAT init;
-	FAUSTFLOAT min;
-	FAUSTFLOAT max;
-	FAUSTFLOAT step;
+	float *zone;
+	float init;
+	float min;
+	float max;
+	float step;
 	char *(*readstr)(UI *ui, int type, char *s, int sz);
 	int (*write)(UI *ui, int type, char *s);
 
--- a/dsp/dspf.h
+++ b/dsp/dspf.h
@@ -8,7 +8,7 @@
 	void (*clear)(DSP *dsp);
 	void (*reset_ui)(DSP *dsp);
 	void (*build_ui)(DSP *dsp, UIGlue *glue);
-	void (*compute)(DSP *dsp, int count, FAUSTFLOAT **in, FAUSTFLOAT **out);
+	void (*compute)(DSP *dsp, int count, float **in, float **out);
 }DSPf;
 
 void *class_init(int rate);
--- a/dsp/fs.c
+++ b/dsp/fs.c
@@ -153,7 +153,7 @@
 	Aux *a, *o;
 	Auxdsp *dsp;
 	char b[256];
-	FAUSTFLOAT *p;
+	float *p;
 	int i, j, n, numframes, framesz;
 
 	a = r->fid->file->aux;
@@ -191,7 +191,7 @@
 			dspf->clear(dsp->dsp);
 		framesz = dsp->numout * sizeof(*p);
 		n = r->ifcall.count;
-		for (p = (FAUSTFLOAT*)r->ofcall.data; n >= framesz;) {
+		for (p = (float*)r->ofcall.data; n >= framesz;) {
 			numframes = n / framesz;
 			if (numframes > dsp->outmax)
 				numframes = dsp->outmax;
--- a/dsp/uiglue.c
+++ b/dsp/uiglue.c
@@ -8,7 +8,7 @@
 #include "aux.h"
 
 static struct {
-	FAUSTFLOAT *zone;
+	float *zone;
 	Meta *meta;
 	int nummeta;
 }decl;
@@ -171,7 +171,7 @@
 }
 
 static UI *
-ui_define(File *f, int type, const char *label, FAUSTFLOAT *zone)
+ui_define(File *f, int type, const char *label, float *zone)
 {
 	UI *ui;
 
@@ -188,19 +188,19 @@
 }
 
 static void
-ui_button(void *f, const char *label, FAUSTFLOAT *zone)
+ui_button(void *f, const char *label, float *zone)
 {
 	ui_define(f, UIButton, label, zone);
 }
 
 static void
-ui_checkbox(void *f, const char *label, FAUSTFLOAT *zone)
+ui_checkbox(void *f, const char *label, float *zone)
 {
 	ui_define(f, UICheckBox, label, zone);
 }
 
 static void
-ui_vslider(void *f, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step)
+ui_vslider(void *f, const char *label, float *zone, float init, float min, float max, float step)
 {
 	UI *ui;
 
@@ -212,7 +212,7 @@
 }
 
 static void
-ui_hslider(void *f, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step)
+ui_hslider(void *f, const char *label, float *zone, float init, float min, float max, float step)
 {
 	UI *ui;
 
@@ -224,7 +224,7 @@
 }
 
 static void
-ui_nentry(void *f, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step)
+ui_nentry(void *f, const char *label, float *zone, float init, float min, float max, float step)
 {
 	UI *ui;
 
@@ -236,7 +236,7 @@
 }
 
 static void
-ui_hbargraph(void *f, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT min, FAUSTFLOAT max)
+ui_hbargraph(void *f, const char *label, float *zone, float min, float max)
 {
 	UI *ui;
 
@@ -246,7 +246,7 @@
 }
 
 static void
-ui_vbargraph(void *f, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT min, FAUSTFLOAT max)
+ui_vbargraph(void *f, const char *label, float *zone, float min, float max)
 {
 	UI *ui;
 
@@ -256,7 +256,7 @@
 }
 
 static void
-ui_declare(void *f, FAUSTFLOAT *zone, const char *key, const char *value)
+ui_declare(void *f, float *zone, const char *key, const char *value)
 {
 	USED(f);
 
--- a/dsp/uiglue.h
+++ b/dsp/uiglue.h
@@ -1,7 +1,3 @@
-#ifndef FAUSTFLOAT
-#define FAUSTFLOAT float
-#endif
-
 typedef struct UIGlue UIGlue;
 typedef struct MetaGlue MetaGlue;
 
@@ -16,14 +12,14 @@
 	void (*openHorizontalBox)(void *uiInterface, const char *label);
 	void (*openVerticalBox)(void *uiInterface, const char *label);
 	void (*closeBox)(void *uiInterface);
-	void (*addButton)(void *uiInterface, const char *label, FAUSTFLOAT *zone);
-	void (*addCheckButton)(void *uiInterface, const char *label, FAUSTFLOAT *zone);
-	void (*addVerticalSlider)(void *uiInterface, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step);
-	void (*addHorizontalSlider)(void *uiInterface, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step);
-	void (*addNumEntry)(void *uiInterface, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step);
-	void (*addHorizontalBargraph)(void *uiInterface, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT min, FAUSTFLOAT max);
-	void (*addVerticalBargraph)(void *uiInterface, const char *label, FAUSTFLOAT *zone, FAUSTFLOAT min, FAUSTFLOAT max);
-	void (*declare)(void *uiInterface, FAUSTFLOAT *zone, const char *key, const char *value);
+	void (*addButton)(void *uiInterface, const char *label, float *zone);
+	void (*addCheckButton)(void *uiInterface, const char *label, float *zone);
+	void (*addVerticalSlider)(void *uiInterface, const char *label, float *zone, float init, float min, float max, float step);
+	void (*addHorizontalSlider)(void *uiInterface, const char *label, float *zone, float init, float min, float max, float step);
+	void (*addNumEntry)(void *uiInterface, const char *label, float *zone, float init, float min, float max, float step);
+	void (*addHorizontalBargraph)(void *uiInterface, const char *label, float *zone, float min, float max);
+	void (*addVerticalBargraph)(void *uiInterface, const char *label, float *zone, float min, float max);
+	void (*declare)(void *uiInterface, float *zone, const char *key, const char *value);
 };
 
 struct MetaGlue {