[PD-cvs] externals/zexy/src z_sigmatrix.c,1.2,1.3
IOhannes m zmölnig
zmoelnig at users.sourceforge.net
Tue Oct 12 09:19:26 CEST 2004
- Previous message: [PD-cvs] externals/hcs linuxevent-help.pd,1.3,1.4
- Next message: [PD-cvs] pd/src d_array.c,1.1.1.3.2.6,1.1.1.3.2.7 d_global.c,1.1.1.2.8.8,1.1.1.2.8.9 m_pd.h,1.1.1.4.2.21,1.1.1.4.2.22 m_simd.c,1.1.2.1,1.1.2.2 m_simd_def.h,1.1.2.7,1.1.2.8 m_simd_sse_gcc.c,1.1.2.8,1.1.2.9 m_simd_sse_gcc.h,1.1.2.14,1.1.2.15 m_simd_sse_vc.c,1.1.2.8,1.1.2.9 m_simd_sse_vc.h,1.1.2.8,1.1.2.9 m_simd_ve_gcc.c,1.1.2.7,1.1.2.8 m_simd_ve_gcc.h,1.1.2.8,1.1.2.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pure-data/externals/zexy/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18872
Modified Files:
z_sigmatrix.c
Log Message:
fixed a bug with sharing signal pointers (thanks tim)
Index: z_sigmatrix.c
===================================================================
RCS file: /cvsroot/pure-data/externals/zexy/src/z_sigmatrix.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** z_sigmatrix.c 18 Jun 2003 13:59:37 -0000 1.2
--- z_sigmatrix.c 12 Oct 2004 07:19:23 -0000 1.3
***************
*** 314,328 ****
t_float **out;
- int changed;
- int oldout;
} t_demux;
static void demux_output(t_demux *x, t_floatarg f)
{
! if ((f>=0)&&(f<x->n_out)&&((int)f!=x->output)){
! x->oldout=x->output;
x->output=f;
! x->changed=1;
! }
}
--- 314,325 ----
t_float **out;
} t_demux;
static void demux_output(t_demux *x, t_floatarg f)
{
! if ((f>=0)&&(f<x->n_out)){
x->output=f;
! } else
! error("demultiplex: %d is channel out of range (0..%d)", (int)f, x->n_out);
}
***************
*** 334,360 ****
int N = (int)(w[3]);
int n = N;
-
- t_float *out = x->out[x->output];
- if(x->changed){
- t_float *oldout=x->out[x->oldout];
- x->changed=0;
! if (out!=in)
! while(n--){
! *out++=*in;
! *in++=*oldout++=0;
! }
! else
! while(n--)*oldout++=0;
- } else { /* !changed */
- if (out!=in)
- while(n--){
- *out++=*in;
- *in++=0;
- }
- }
return (w+4);
}
--- 331,347 ----
int N = (int)(w[3]);
int n = N;
! int channel=x->n_out;
+ while(channel--){
+ t_float*out=x->out[channel];
+ n=N;
+ if(x->output==channel){
+ while(n--)*out++=*in++;
+ } else
+ while(n--)*out++=0.f;
+ }
return (w+4);
}
***************
*** 427,442 ****
int n_in;
t_float **in;
-
- int changed;
- int oldin;
} t_mux;
static void mux_input(t_mux *x, t_floatarg f)
{
! if ((f>=0)&&(f<x->n_in)&&((int)f!=x->input)){
! x->oldin=x->input;
x->input=f;
! x->changed=1;
! }
}
--- 414,426 ----
int n_in;
t_float **in;
} t_mux;
static void mux_input(t_mux *x, t_floatarg f)
{
! if ((f>=0)&&(f<x->n_in)){
x->input=f;
! } else
! error("multiplex: %d is channel out of range (0..%d)", (int)f, x->n_in);
!
}
***************
*** 447,470 ****
int n = (int)(w[3]);
! t_float *in;
!
! in = x->in[x->input];
- if(x->changed){
- t_float *oldin=x->in[x->oldin];
- x->changed=0;
- if (in!=out)
- while(n--){
- *out++=*in;
- *in++=*oldin++=0;
- }
- else while(n--)*oldin++=0;
- } else {
- if (in!=out)
- while(n--){
- *out++=*in;
- *in++=0;
- }
- }
return (w+4);
}
--- 431,438 ----
int n = (int)(w[3]);
! t_float *in = x->in[x->input];
!
! while(n--)*out++=*in++;
return (w+4);
}
- Previous message: [PD-cvs] externals/hcs linuxevent-help.pd,1.3,1.4
- Next message: [PD-cvs] pd/src d_array.c,1.1.1.3.2.6,1.1.1.3.2.7 d_global.c,1.1.1.2.8.8,1.1.1.2.8.9 m_pd.h,1.1.1.4.2.21,1.1.1.4.2.22 m_simd.c,1.1.2.1,1.1.2.2 m_simd_def.h,1.1.2.7,1.1.2.8 m_simd_sse_gcc.c,1.1.2.8,1.1.2.9 m_simd_sse_gcc.h,1.1.2.14,1.1.2.15 m_simd_sse_vc.c,1.1.2.8,1.1.2.9 m_simd_sse_vc.h,1.1.2.8,1.1.2.9 m_simd_ve_gcc.c,1.1.2.7,1.1.2.8 m_simd_ve_gcc.h,1.1.2.8,1.1.2.9
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Pd-cvs
mailing list