Commit e2407c2d authored by Miller Puckette's avatar Miller Puckette
Browse files

took big patches to rely more on t_float, etc.

parent 2b015d09
makesfx /zip=pd-0.37-1test6.zip /sfx=pd-x.msw.exe /title=Pd /website=crca.ucsd.edu/~msp /defaultpath=$programfiles$ zip -r pd-0.41-0test09.msw.zip pd
makesfx /zip=pd-0.41-0test09.msw.zip /sfx=pd-0.41-0test09.msw.exe /title=Pd /website=crca.ucsd.edu/~msp /defaultpath=$programfiles$
pscp pd-0.41-0test09.msw.zip pd-0.41-0test09.msw.exe msp@crca.ucsd.edu:public_html/Software
...@@ -16,13 +16,13 @@ static t_class *plus_class, *scalarplus_class; ...@@ -16,13 +16,13 @@ static t_class *plus_class, *scalarplus_class;
typedef struct _plus typedef struct _plus
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
} t_plus; } t_plus;
typedef struct _scalarplus typedef struct _scalarplus
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
t_float x_g; /* inlet value */ t_float x_g; /* inlet value */
} t_scalarplus; } t_scalarplus;
...@@ -50,9 +50,9 @@ static void *plus_new(t_symbol *s, int argc, t_atom *argv) ...@@ -50,9 +50,9 @@ static void *plus_new(t_symbol *s, int argc, t_atom *argv)
t_int *plus_perform(t_int *w) t_int *plus_perform(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) *out++ = *in1++ + *in2++; while (n--) *out++ = *in1++ + *in2++;
return (w+5); return (w+5);
...@@ -60,17 +60,17 @@ t_int *plus_perform(t_int *w) ...@@ -60,17 +60,17 @@ t_int *plus_perform(t_int *w)
t_int *plus_perf8(t_int *w) t_int *plus_perf8(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) for (; n; n -= 8, in1 += 8, in2 += 8, out += 8)
{ {
float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3];
float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7]; t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3];
float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7]; t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 + g0; out[1] = f1 + g1; out[2] = f2 + g2; out[3] = f3 + g3; out[0] = f0 + g0; out[1] = f1 + g1; out[2] = f2 + g2; out[3] = f3 + g3;
out[4] = f4 + g4; out[5] = f5 + g5; out[6] = f6 + g6; out[7] = f7 + g7; out[4] = f4 + g4; out[5] = f5 + g5; out[6] = f6 + g6; out[7] = f7 + g7;
...@@ -80,9 +80,9 @@ t_int *plus_perf8(t_int *w) ...@@ -80,9 +80,9 @@ t_int *plus_perf8(t_int *w)
t_int *scalarplus_perform(t_int *w) t_int *scalarplus_perform(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float f = *(t_float *)(w[2]); t_float f = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) *out++ = *in++ + f; while (n--) *out++ = *in++ + f;
return (w+5); return (w+5);
...@@ -90,14 +90,14 @@ t_int *scalarplus_perform(t_int *w) ...@@ -90,14 +90,14 @@ t_int *scalarplus_perform(t_int *w)
t_int *scalarplus_perf8(t_int *w) t_int *scalarplus_perf8(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float g = *(t_float *)(w[2]); t_float g = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in += 8, out += 8) for (; n; n -= 8, in += 8, out += 8)
{ {
float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3];
float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7]; t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 + g; out[1] = f1 + g; out[2] = f2 + g; out[3] = f3 + g; out[0] = f0 + g; out[1] = f1 + g; out[2] = f2 + g; out[3] = f3 + g;
out[4] = f4 + g; out[5] = f5 + g; out[6] = f6 + g; out[7] = f7 + g; out[4] = f4 + g; out[5] = f5 + g; out[6] = f6 + g; out[7] = f7 + g;
...@@ -149,13 +149,13 @@ static t_class *minus_class, *scalarminus_class; ...@@ -149,13 +149,13 @@ static t_class *minus_class, *scalarminus_class;
typedef struct _minus typedef struct _minus
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
} t_minus; } t_minus;
typedef struct _scalarminus typedef struct _scalarminus
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
t_float x_g; t_float x_g;
} t_scalarminus; } t_scalarminus;
...@@ -183,9 +183,9 @@ static void *minus_new(t_symbol *s, int argc, t_atom *argv) ...@@ -183,9 +183,9 @@ static void *minus_new(t_symbol *s, int argc, t_atom *argv)
t_int *minus_perform(t_int *w) t_int *minus_perform(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) *out++ = *in1++ - *in2++; while (n--) *out++ = *in1++ - *in2++;
return (w+5); return (w+5);
...@@ -193,17 +193,17 @@ t_int *minus_perform(t_int *w) ...@@ -193,17 +193,17 @@ t_int *minus_perform(t_int *w)
t_int *minus_perf8(t_int *w) t_int *minus_perf8(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) for (; n; n -= 8, in1 += 8, in2 += 8, out += 8)
{ {
float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3];
float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7]; t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3];
float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7]; t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 - g0; out[1] = f1 - g1; out[2] = f2 - g2; out[3] = f3 - g3; out[0] = f0 - g0; out[1] = f1 - g1; out[2] = f2 - g2; out[3] = f3 - g3;
out[4] = f4 - g4; out[5] = f5 - g5; out[6] = f6 - g6; out[7] = f7 - g7; out[4] = f4 - g4; out[5] = f5 - g5; out[6] = f6 - g6; out[7] = f7 - g7;
...@@ -213,9 +213,9 @@ t_int *minus_perf8(t_int *w) ...@@ -213,9 +213,9 @@ t_int *minus_perf8(t_int *w)
t_int *scalarminus_perform(t_int *w) t_int *scalarminus_perform(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float f = *(t_float *)(w[2]); t_float f = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) *out++ = *in++ - f; while (n--) *out++ = *in++ - f;
return (w+5); return (w+5);
...@@ -223,14 +223,14 @@ t_int *scalarminus_perform(t_int *w) ...@@ -223,14 +223,14 @@ t_int *scalarminus_perform(t_int *w)
t_int *scalarminus_perf8(t_int *w) t_int *scalarminus_perf8(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float g = *(t_float *)(w[2]); t_float g = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in += 8, out += 8) for (; n; n -= 8, in += 8, out += 8)
{ {
float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3];
float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7]; t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 - g; out[1] = f1 - g; out[2] = f2 - g; out[3] = f3 - g; out[0] = f0 - g; out[1] = f1 - g; out[2] = f2 - g; out[3] = f3 - g;
out[4] = f4 - g; out[5] = f5 - g; out[6] = f6 - g; out[7] = f7 - g; out[4] = f4 - g; out[5] = f5 - g; out[6] = f6 - g; out[7] = f7 - g;
...@@ -280,13 +280,13 @@ static t_class *times_class, *scalartimes_class; ...@@ -280,13 +280,13 @@ static t_class *times_class, *scalartimes_class;
typedef struct _times typedef struct _times
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
} t_times; } t_times;
typedef struct _scalartimes typedef struct _scalartimes
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
t_float x_g; t_float x_g;
} t_scalartimes; } t_scalartimes;
...@@ -314,9 +314,9 @@ static void *times_new(t_symbol *s, int argc, t_atom *argv) ...@@ -314,9 +314,9 @@ static void *times_new(t_symbol *s, int argc, t_atom *argv)
t_int *times_perform(t_int *w) t_int *times_perform(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) *out++ = *in1++ * *in2++; while (n--) *out++ = *in1++ * *in2++;
return (w+5); return (w+5);
...@@ -324,17 +324,17 @@ t_int *times_perform(t_int *w) ...@@ -324,17 +324,17 @@ t_int *times_perform(t_int *w)
t_int *times_perf8(t_int *w) t_int *times_perf8(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) for (; n; n -= 8, in1 += 8, in2 += 8, out += 8)
{ {
float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3];
float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7]; t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3];
float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7]; t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = f0 * g0; out[1] = f1 * g1; out[2] = f2 * g2; out[3] = f3 * g3; out[0] = f0 * g0; out[1] = f1 * g1; out[2] = f2 * g2; out[3] = f3 * g3;
out[4] = f4 * g4; out[5] = f5 * g5; out[6] = f6 * g6; out[7] = f7 * g7; out[4] = f4 * g4; out[5] = f5 * g5; out[6] = f6 * g6; out[7] = f7 * g7;
...@@ -344,9 +344,9 @@ t_int *times_perf8(t_int *w) ...@@ -344,9 +344,9 @@ t_int *times_perf8(t_int *w)
t_int *scalartimes_perform(t_int *w) t_int *scalartimes_perform(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float f = *(t_float *)(w[2]); t_float f = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) *out++ = *in++ * f; while (n--) *out++ = *in++ * f;
return (w+5); return (w+5);
...@@ -354,14 +354,14 @@ t_int *scalartimes_perform(t_int *w) ...@@ -354,14 +354,14 @@ t_int *scalartimes_perform(t_int *w)
t_int *scalartimes_perf8(t_int *w) t_int *scalartimes_perf8(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float g = *(t_float *)(w[2]); t_float g = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in += 8, out += 8) for (; n; n -= 8, in += 8, out += 8)
{ {
float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3];
float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7]; t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g; out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g;
out[4] = f4 * g; out[5] = f5 * g; out[6] = f6 * g; out[7] = f7 * g; out[4] = f4 * g; out[5] = f5 * g; out[6] = f6 * g; out[7] = f7 * g;
...@@ -410,13 +410,13 @@ static t_class *over_class, *scalarover_class; ...@@ -410,13 +410,13 @@ static t_class *over_class, *scalarover_class;
typedef struct _over typedef struct _over
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
} t_over; } t_over;
typedef struct _scalarover typedef struct _scalarover
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
t_float x_g; t_float x_g;
} t_scalarover; } t_scalarover;
...@@ -444,13 +444,13 @@ static void *over_new(t_symbol *s, int argc, t_atom *argv) ...@@ -444,13 +444,13 @@ static void *over_new(t_symbol *s, int argc, t_atom *argv)
t_int *over_perform(t_int *w) t_int *over_perform(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) while (n--)
{ {
float g = *in2++; t_sample g = *in2++;
*out++ = (g ? *in1++ / g : 0); *out++ = (g ? *in1++ / g : 0);
} }
return (w+5); return (w+5);
...@@ -458,17 +458,17 @@ t_int *over_perform(t_int *w) ...@@ -458,17 +458,17 @@ t_int *over_perform(t_int *w)
t_int *over_perf8(t_int *w) t_int *over_perf8(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) for (; n; n -= 8, in1 += 8, in2 += 8, out += 8)
{ {
float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3];
float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7]; t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3];
float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7]; t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (g0? f0 / g0 : 0); out[0] = (g0? f0 / g0 : 0);
out[1] = (g1? f1 / g1 : 0); out[1] = (g1? f1 / g1 : 0);
...@@ -484,9 +484,9 @@ t_int *over_perf8(t_int *w) ...@@ -484,9 +484,9 @@ t_int *over_perf8(t_int *w)
t_int *scalarover_perform(t_int *w) t_int *scalarover_perform(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float f = *(t_float *)(w[2]); t_float f = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
if(f) f = 1./f; if(f) f = 1./f;
while (n--) *out++ = *in++ * f; while (n--) *out++ = *in++ * f;
...@@ -495,15 +495,15 @@ t_int *scalarover_perform(t_int *w) ...@@ -495,15 +495,15 @@ t_int *scalarover_perform(t_int *w)
t_int *scalarover_perf8(t_int *w) t_int *scalarover_perf8(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float g = *(t_float *)(w[2]); t_float g = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
if (g) g = 1.f / g; if (g) g = 1.f / g;
for (; n; n -= 8, in += 8, out += 8) for (; n; n -= 8, in += 8, out += 8)
{ {
float f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3]; t_sample f0 = in[0], f1 = in[1], f2 = in[2], f3 = in[3];
float f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7]; t_sample f4 = in[4], f5 = in[5], f6 = in[6], f7 = in[7];
out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g; out[0] = f0 * g; out[1] = f1 * g; out[2] = f2 * g; out[3] = f3 * g;
out[4] = f4 * g; out[5] = f5 * g; out[6] = f6 * g; out[7] = f7 * g; out[4] = f4 * g; out[5] = f5 * g; out[6] = f6 * g; out[7] = f7 * g;
...@@ -552,13 +552,13 @@ static t_class *max_class, *scalarmax_class; ...@@ -552,13 +552,13 @@ static t_class *max_class, *scalarmax_class;
typedef struct _max typedef struct _max
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
} t_max; } t_max;
typedef struct _scalarmax typedef struct _scalarmax
{ {
t_object x_obj; t_object x_obj;
float x_f; t_float x_f;
t_float x_g; t_float x_g;
} t_scalarmax; } t_scalarmax;
...@@ -586,13 +586,13 @@ static void *max_new(t_symbol *s, int argc, t_atom *argv) ...@@ -586,13 +586,13 @@ static void *max_new(t_symbol *s, int argc, t_atom *argv)
t_int *max_perform(t_int *w) t_int *max_perform(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) while (n--)
{ {
float f = *in1++, g = *in2++; t_sample f = *in1++, g = *in2++;
*out++ = (f > g ? f : g); *out++ = (f > g ? f : g);
} }
return (w+5); return (w+5);
...@@ -600,17 +600,17 @@ t_int *max_perform(t_int *w) ...@@ -600,17 +600,17 @@ t_int *max_perform(t_int *w)
t_int *max_perf8(t_int *w) t_int *max_perf8(t_int *w)
{ {
t_float *in1 = (t_float *)(w[1]); t_sample *in1 = (t_sample *)(w[1]);
t_float *in2 = (t_float *)(w[2]); t_sample *in2 = (t_sample *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
for (; n; n -= 8, in1 += 8, in2 += 8, out += 8) for (; n; n -= 8, in1 += 8, in2 += 8, out += 8)
{ {
float f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3]; t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3];
float f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7]; t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
float g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3]; t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3];
float g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7]; t_sample g4 = in2[4], g5 = in2[5], g6 = in2[6], g7 = in2[7];
out[0] = (f0 > g0 ? f0 : g0); out[1] = (f1 > g1 ? f1 : g1); out[0] = (f0 > g0 ? f0 : g0); out[1] = (f1 > g1 ? f1 : g1);
out[2] = (f2 > g2 ? f2 : g2); out[3] = (f3 > g3 ? f3 : g3); out[2] = (f2 > g2 ? f2 : g2); out[3] = (f3 > g3 ? f3 : g3);
...@@ -622,13 +622,13 @@ t_int *max_perf8(t_int *w) ...@@ -622,13 +622,13 @@ t_int *max_perf8(t_int *w)
t_int *scalarmax_perform(t_int *w) t_int *scalarmax_perform(t_int *w)
{ {
t_float *in = (t_float *)(w[1]); t_sample *in = (t_sample *)(w[1]);
t_float f = *(t_float *)(w[2]); t_float f = *(t_float *)(w[2]);
t_float *out = (t_float *)(w[3]); t_sample *out = (t_sample *)(w[3]);
int n = (int)(w[4]); int n = (int)(w[4]);
while (n--) while (n--)