[PD-cvs] externals/pidip/modules pdp_yqt.c,1.2,1.3
sevyves at users.sourceforge.net
sevyves at users.sourceforge.net
Fri Oct 24 03:42:35 CEST 2003
Update of /cvsroot/pure-data/externals/pidip/modules
In directory sc8-pr-cvs1:/tmp/cvs-serv29365
Modified Files:
pdp_yqt.c
Log Message:
Updated for PiDiP 0.12.10
Index: pdp_yqt.c
===================================================================
RCS file: /cvsroot/pure-data/externals/pidip/modules/pdp_yqt.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** pdp_yqt.c 17 Sep 2003 20:10:21 -0000 1.2
--- pdp_yqt.c 24 Oct 2003 01:42:33 -0000 1.3
***************
*** 30,38 ****
#define DECODE_PACKET_SIZE 16*1024 /* size of audio data decoded in one call */
- typedef struct pdp_yqt_data
- {
- short int gain[4];
- } t_pdp_yqt_data;
-
typedef struct pdp_yqt_struct
{
--- 30,33 ----
***************
*** 74,79 ****
t_float *x_outr;
- t_pdp_yqt_data *state_data;
-
} t_pdp_yqt;
--- 69,72 ----
***************
*** 184,189 ****
t_pdp* header;
- static short int gain[4] = {0x7fff, 0x7fff, 0x7fff, 0x7fff};
-
if (!(x->initialized)){
//post("pdp_yqt: no qt file opened");
--- 177,180 ----
***************
*** 308,331 ****
}
- static void pdp_yqt_gain(t_pdp_yqt *x, t_floatarg f)
- {
- int i;
- short int g;
- float bound = (float)0x7fff;
-
- f *= (float)0x7fff;
-
- f = (f>bound) ? bound : f;
- f = (f<-bound) ? -bound : f;
-
- g = (short int)f;
-
- for (i=0; i<4; i++) x->state_data->gain[i] = g;
- }
-
static void pdp_yqt_free(t_pdp_yqt *x)
{
- free (x->state_data);
pdp_yqt_close(x);
--- 299,305 ----
***************
*** 342,346 ****
inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("frame_cold"));
- inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("float"), gensym("gain"));
x->x_outlet0 = outlet_new(&x->x_obj, &s_anything);
--- 316,319 ----
***************
*** 357,363 ****
x->loop = false;
- x->state_data = (t_pdp_yqt_data *)malloc(sizeof(t_pdp_yqt_data));
- pdp_yqt_gain(x, 1.0f);
-
// allocate audio buffers
x->x_outbuffersize = OUTPUT_BUFFER_SIZE;
--- 330,333 ----
***************
*** 434,438 ****
class_addfloat (pdp_yqt_class, (t_method)pdp_yqt_frame);
class_addmethod(pdp_yqt_class, (t_method)pdp_yqt_frame_cold, gensym("frame_cold"), A_FLOAT, A_NULL);
- class_addmethod(pdp_yqt_class, (t_method)pdp_yqt_gain, gensym("gain"), A_FLOAT, A_NULL);
class_addmethod(pdp_yqt_class, nullfn, gensym("signal"), 0);
class_addmethod(pdp_yqt_class, (t_method)pdp_yqt_dsp, gensym("dsp"), 0);
--- 404,407 ----
More information about the Pd-cvs
mailing list