remove dead code
This commit is contained in:
parent
7e1557557f
commit
efa1af754a
1 changed files with 0 additions and 127 deletions
127
main/pdmain.c
127
main/pdmain.c
|
|
@ -1008,133 +1008,6 @@ double sys_getrealtime(void)
|
|||
(1./1000000.) * (now.tv_usec - then.tv_usec));
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* -------------- DSP basics - LATER move to d_ugen.c --------------- */
|
||||
|
||||
t_int *plus_perform(t_int *w)
|
||||
{
|
||||
t_sample *in1 = (t_sample *)(w[1]);
|
||||
t_sample *in2 = (t_sample *)(w[2]);
|
||||
t_sample *out = (t_sample *)(w[3]);
|
||||
int n = (int)(w[4]);
|
||||
while (n--) *out++ = *in1++ + *in2++;
|
||||
return (w+5);
|
||||
}
|
||||
|
||||
t_int *plus_perf8(t_int *w)
|
||||
{
|
||||
t_sample *in1 = (t_sample *)(w[1]);
|
||||
t_sample *in2 = (t_sample *)(w[2]);
|
||||
t_sample *out = (t_sample *)(w[3]);
|
||||
int n = (int)(w[4]);
|
||||
for (; n; n -= 8, in1 += 8, in2 += 8, out += 8)
|
||||
{
|
||||
t_sample f0 = in1[0], f1 = in1[1], f2 = in1[2], f3 = in1[3];
|
||||
t_sample f4 = in1[4], f5 = in1[5], f6 = in1[6], f7 = in1[7];
|
||||
|
||||
t_sample g0 = in2[0], g1 = in2[1], g2 = in2[2], g3 = in2[3];
|
||||
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[4] = f4 + g4; out[5] = f5 + g5; out[6] = f6 + g6; out[7] = f7 + g7;
|
||||
}
|
||||
return (w+5);
|
||||
}
|
||||
|
||||
void dsp_add_plus(t_sample *in1, t_sample *in2, t_sample *out, int n)
|
||||
{
|
||||
if (n&7)
|
||||
dsp_add(plus_perform, 4, in1, in2, out, (t_int)n);
|
||||
else
|
||||
dsp_add(plus_perf8, 4, in1, in2, out, (t_int)n);
|
||||
}
|
||||
|
||||
|
||||
t_int *copy_perform(t_int *w)
|
||||
{
|
||||
t_sample *in1 = (t_sample *)(w[1]);
|
||||
t_sample *out = (t_sample *)(w[2]);
|
||||
int n = (int)(w[3]);
|
||||
while (n--) *out++ = *in1++;
|
||||
return (w+4);
|
||||
}
|
||||
|
||||
static t_int *copy_perf8(t_int *w)
|
||||
{
|
||||
t_sample *in1 = (t_sample *)(w[1]);
|
||||
t_sample *out = (t_sample *)(w[2]);
|
||||
int n = (int)(w[3]);
|
||||
|
||||
for (; n; n -= 8, in1 += 8, out += 8)
|
||||
{
|
||||
t_sample f0 = in1[0];
|
||||
t_sample f1 = in1[1];
|
||||
t_sample f2 = in1[2];
|
||||
t_sample f3 = in1[3];
|
||||
t_sample f4 = in1[4];
|
||||
t_sample f5 = in1[5];
|
||||
t_sample f6 = in1[6];
|
||||
t_sample f7 = in1[7];
|
||||
|
||||
out[0] = f0;
|
||||
out[1] = f1;
|
||||
out[2] = f2;
|
||||
out[3] = f3;
|
||||
out[4] = f4;
|
||||
out[5] = f5;
|
||||
out[6] = f6;
|
||||
out[7] = f7;
|
||||
}
|
||||
return (w+4);
|
||||
}
|
||||
|
||||
void dsp_add_copy(t_sample *in, t_sample *out, int n)
|
||||
{
|
||||
if (n&7)
|
||||
dsp_add(copy_perform, 3, in, out, (t_int)n);
|
||||
else
|
||||
dsp_add(copy_perf8, 3, in, out, (t_int)n);
|
||||
}
|
||||
|
||||
static t_int *sig_tilde_perform(t_int *w)
|
||||
{
|
||||
t_float f = *(t_float *)(w[1]);
|
||||
t_sample *out = (t_sample *)(w[2]);
|
||||
int n = (int)(w[3]);
|
||||
while (n--)
|
||||
*out++ = f;
|
||||
return (w+4);
|
||||
}
|
||||
|
||||
static t_int *sig_tilde_perf8(t_int *w)
|
||||
{
|
||||
t_float f = *(t_float *)(w[1]);
|
||||
t_sample *out = (t_sample *)(w[2]);
|
||||
int n = (int)(w[3]);
|
||||
|
||||
for (; n; n -= 8, out += 8)
|
||||
{
|
||||
out[0] = f;
|
||||
out[1] = f;
|
||||
out[2] = f;
|
||||
out[3] = f;
|
||||
out[4] = f;
|
||||
out[5] = f;
|
||||
out[6] = f;
|
||||
out[7] = f;
|
||||
}
|
||||
return (w+4);
|
||||
}
|
||||
|
||||
void dsp_add_scalarcopy(t_float *in, t_sample *out, int n)
|
||||
{
|
||||
if (n&7)
|
||||
dsp_add(sig_tilde_perform, 3, in, out, (t_int)n);
|
||||
else
|
||||
dsp_add(sig_tilde_perf8, 3, in, out, (t_int)n);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* ------------------ g_traversal.c --------------- */
|
||||
|
||||
/* ------------- gstubs and gpointers - safe pointing --------------- */
|
||||
|
|
|
|||
Loading…
Reference in a new issue