Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6437
Modified Files:
Tag: devel_0_39
d_array.c d_ctl.c d_dac.c d_delay.c d_fftroutine.c
d_mayer_fft.c d_osc.c d_soundfile.c d_ugen.c
Log Message:
fixed warnings
Index: d_dac.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_dac.c,v
retrieving revision 1.3.4.2
retrieving revision 1.3.4.2.2.1
diff -C2 -d -r1.3.4.2 -r1.3.4.2.2.1
*** d_dac.c 10 Nov 2004 13:47:08 -0000 1.3.4.2
--- d_dac.c 27 Nov 2005 07:59:05 -0000 1.3.4.2.2.1
***************
*** 26,30 ****
{
t_dac *x = (t_dac *)pd_new(dac_class);
! t_atom defarg[2], *ap;
int i;
if (!argc)
--- 26,30 ----
{
t_dac *x = (t_dac *)pd_new(dac_class);
! t_atom defarg[2];
int i;
if (!argc)
***************
*** 54,59 ****
if ((*sp2)->s_n != sys_dacblocksize)
error("dac~: bad vector size");
! else
! if (ch >= 0 && ch < sys_get_outchannels())
if(SIMD_CHECK3(sys_dacblocksize,sys_soundout + sys_dacblocksize*ch,
(*sp2)->s_vec,sys_soundout + sys_dacblocksize*ch))
--- 54,58 ----
if ((*sp2)->s_n != sys_dacblocksize)
error("dac~: bad vector size");
! else if (ch >= 0 && ch < sys_get_outchannels()) {
if(SIMD_CHECK3(sys_dacblocksize,sys_soundout + sys_dacblocksize*ch,
(*sp2)->s_vec,sys_soundout + sys_dacblocksize*ch))
***************
*** 63,66 ****
--- 62,66 ----
dsp_add(plus_perform, 4, sys_soundout + sys_dacblocksize*ch,
(*sp2)->s_vec, sys_soundout + sys_dacblocksize*ch, sys_dacblocksize);
+ }
}
}
***************
*** 93,97 ****
{
t_adc *x = (t_adc *)pd_new(adc_class);
! t_atom defarg[2], *ap;
int i;
if (!argc)
--- 93,97 ----
{
t_adc *x = (t_adc *)pd_new(adc_class);
! t_atom defarg[2];
int i;
if (!argc)
Index: d_fftroutine.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_fftroutine.c,v
retrieving revision 1.2.8.1
retrieving revision 1.2.8.2
diff -C2 -d -r1.2.8.1 -r1.2.8.2
*** d_fftroutine.c 28 Oct 2005 11:34:14 -0000 1.2.8.1
--- d_fftroutine.c 27 Nov 2005 07:59:05 -0000 1.2.8.2
***************
*** 281,285 ****
net_dealloc(thisnet);
free((char *)thisnet);
! } while (thisnet = nextnet);
}
}
--- 281,285 ----
net_dealloc(thisnet);
free((char *)thisnet);
! } while ((thisnet = nextnet));
}
}
***************
*** 487,491 ****
int *load_index = fft_net->load_index;
SAMPLE *window;
! int index, i = 0, n = fft_net->n;
if (trnsfrm_dir==FORWARD) window = fft_net->window;
--- 487,491 ----
int *load_index = fft_net->load_index;
SAMPLE *window;
! int index, i = 0;
if (trnsfrm_dir==FORWARD) window = fft_net->window;
***************
*** 618,622 ****
{
int i;
! SAMPLE real, imag, mag, phase;
int n;
--- 618,622 ----
{
int i;
! SAMPLE real, imag;
int n;
***************
*** 991,995 ****
{
double renorm;
! float *fp, *fp2;
int i;
renorm = (inverse ? npoints : 1.);
--- 991,995 ----
{
double renorm;
! float *fp;
int i;
renorm = (inverse ? npoints : 1.);
Index: d_ctl.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_ctl.c,v
retrieving revision 1.3.4.12.2.1
retrieving revision 1.3.4.12.2.2
diff -C2 -d -r1.3.4.12.2.1 -r1.3.4.12.2.2
*** d_ctl.c 28 Oct 2005 11:34:14 -0000 1.3.4.12.2.1
--- d_ctl.c 27 Nov 2005 07:59:05 -0000 1.3.4.12.2.2
***************
*** 202,207 ****
if (x->x_ticksleft)
{
! float f = x->x_value;
! line_tilde_slope(out, n, &x->x_value, x->x_slopes, &x->x_slopestep);
x->x_value += x->x_biginc;
x->x_ticksleft--;
--- 202,206 ----
if (x->x_ticksleft)
{
! line_tilde_slope(out, n, &x->x_value, x->x_slopes, &x->x_slopestep);
x->x_value += x->x_biginc;
x->x_ticksleft--;
***************
*** 244,249 ****
if (x->x_ticksleft)
{
! float f = x->x_value;
! line_tilde_slope_simd(out, n, &x->x_value, x->x_slopes, &x->x_slopestep);
x->x_value += x->x_biginc;
x->x_ticksleft--;
--- 243,247 ----
if (x->x_ticksleft)
{
! line_tilde_slope_simd(out, n, &x->x_value, x->x_slopes, &x->x_slopestep);
x->x_value += x->x_biginc;
x->x_ticksleft--;
***************
*** 357,361 ****
double inc = x->x_inc;
double msecpersamp = x->x_msecpersamp;
- double samppermsec = x->x_samppermsec;
double timenow = clock_gettimesince(x->x_referencetime) - n * msecpersamp;
t_vseg *s = x->x_list;
--- 355,358 ----
***************
*** 446,450 ****
else
{
! for (s1 = x->x_list; s2 = s1->s_next; s1 = s2)
{
if (s2->s_starttime > starttime ||
--- 443,447 ----
else
{
! for (s1 = x->x_list; (s2 = s1->s_next); s1 = s2)
{
if (s2->s_starttime > starttime ||
Index: d_array.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_array.c,v
retrieving revision 1.3.4.3.2.1
retrieving revision 1.3.4.3.2.2
diff -C2 -d -r1.3.4.3.2.1 -r1.3.4.3.2.2
*** d_array.c 12 Jul 2005 15:10:50 -0000 1.3.4.3.2.1
--- d_array.c 27 Nov 2005 07:59:05 -0000 1.3.4.3.2.2
***************
*** 24,29 ****
} t_tabwrite_tilde;
- static void tabwrite_tilde_tick(t_tabwrite_tilde *x);
-
static void *tabwrite_tilde_new(t_symbol *s)
{
--- 24,27 ----
***************
*** 326,330 ****
int n = (int)(w[4]);
int maxindex;
! float *buf = x->x_vec, *fp;
int i;
--- 324,328 ----
int n = (int)(w[4]);
int maxindex;
! float *buf = x->x_vec;
int i;
***************
*** 450,454 ****
int index = findex;
float frac, a, b, c, d, cminusb;
- static int count;
if (index < 1)
index = 1, frac = 0;
--- 448,451 ----
***************
*** 461,466 ****
c = fp[1];
d = fp[2];
- /* if (!i && !(count++ & 1023))
- post("fp = %lx, shit = %lx, b = %f", fp, buf->b_shit, b); */
cminusb = c-b;
*out++ = b + frac * (
--- 458,461 ----
***************
*** 625,631 ****
int mask = fnpoints - 1;
float conv = fnpoints * x->x_conv;
- int maxindex;
float *tab = x->x_vec, *addr;
- int i;
double dphase = fnpoints * x->x_phase + UNITBIT32;
--- 620,624 ----
***************
*** 634,638 ****
normhipart = tf.tf_i[HIOFFSET];
- #if 1
while (n--)
{
--- 627,630 ----
***************
*** 654,658 ****
);
}
- #endif
tf.tf_d = UNITBIT32 * fnpoints;
--- 646,649 ----
***************
*** 742,747 ****
} t_tabsend;
- static void tabsend_tick(t_tabsend *x);
-
static void *tabsend_new(t_symbol *s)
{
--- 733,736 ----
***************
*** 805,809 ****
static void tabsend_dsp(t_tabsend *x, t_signal **sp)
{
! int i, vecsize;
t_garray *a;
--- 794,798 ----
static void tabsend_dsp(t_tabsend *x, t_signal **sp)
{
! int vecsize;
t_garray *a;
***************
*** 1065,1069 ****
static void tabwrite_float(t_tabwrite *x, t_float f)
{
! int i, vecsize;
t_garray *a;
t_float *vec;
--- 1054,1058 ----
static void tabwrite_float(t_tabwrite *x, t_float f)
{
! int vecsize;
t_garray *a;
t_float *vec;
Index: d_soundfile.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_soundfile.c,v
retrieving revision 1.4.4.11.2.7
retrieving revision 1.4.4.11.2.8
diff -C2 -d -r1.4.4.11.2.7 -r1.4.4.11.2.8
*** d_soundfile.c 28 Oct 2005 11:34:14 -0000 1.4.4.11.2.7
--- d_soundfile.c 27 Nov 2005 07:59:05 -0000 1.4.4.11.2.8
***************
*** 206,210 ****
{
char buf[OBUFSIZE], *bufptr;
! int fd, format, nchannels, bigendian, bytespersamp, swap, sysrtn;
long bytelimit = 0x7fffffff;
errno = 0;
--- 206,210 ----
{
char buf[OBUFSIZE], *bufptr;
! int fd, nchannels, bigendian, bytespersamp, swap, sysrtn;
long bytelimit = 0x7fffffff;
errno = 0;
***************
*** 247,252 ****
if (format == FORMAT_NEXT) /* nextstep header */
{
! uint32 param;
! if (bytesread < (int)sizeof(t_nextstep))
goto badheader;
nchannels = swap4(((t_nextstep *)buf)->ns_nchans, swap);
--- 247,251 ----
if (format == FORMAT_NEXT) /* nextstep header */
{
! if (bytesread < (int)sizeof(t_nextstep))
goto badheader;
nchannels = swap4(((t_nextstep *)buf)->ns_nchans, swap);
***************
*** 1881,1885 ****
int headersize = -1, channels = 0, bytespersamp = 0, bigendian = 0,
resize = 0, i, j;
! long skipframes = 0, nframes = 0, finalsize = 0, itemsleft,
maxsize = DEFMAXSIZE, itemsread = 0, bytelimit = 0x7fffffff;
int fd = -1;
--- 1880,1884 ----
int headersize = -1, channels = 0, bytespersamp = 0, bigendian = 0,
resize = 0, i, j;
! long skipframes = 0, nframes = 0, finalsize = 0,
maxsize = DEFMAXSIZE, itemsread = 0, bytelimit = 0x7fffffff;
int fd = -1;
***************
*** 2041,2045 ****
for (i = 0; i < argc; i++)
{
! int nzero, vecsize;
garray_getfloatarray(garrays[i], &vecsize, &vecs[i]);
for (j = itemsread; j < vecsize; j++)
--- 2040,2044 ----
for (i = 0; i < argc; i++)
{
! int vecsize;
garray_getfloatarray(garrays[i], &vecsize, &vecs[i]);
for (j = itemsread; j < vecsize; j++)
***************
*** 2077,2088 ****
int argc, t_atom *argv)
{
! int headersize, bytespersamp, bigendian,
! endianness, swap, filetype, normalize, i, j, nchannels;
! long onset, nframes, itemsleft,
! maxsize = DEFMAXSIZE, itemswritten = 0;
t_garray *garrays[MAXSFCHANS];
t_float *vecs[MAXSFCHANS];
char sampbuf[SAMPBUFSIZE];
! int bufframes, nitems;
int fd = -1;
float normfactor, biggest = 0, samplerate;
--- 2076,2085 ----
int argc, t_atom *argv)
{
! int bytespersamp, bigendian, swap, filetype, normalize, i, j, nchannels;
! long onset, nframes, itemswritten = 0;
t_garray *garrays[MAXSFCHANS];
t_float *vecs[MAXSFCHANS];
char sampbuf[SAMPBUFSIZE];
! int bufframes;
int fd = -1;
float normfactor, biggest = 0, samplerate;
***************
*** 2153,2157 ****
for (itemswritten = 0; itemswritten < nframes; )
{
! int thiswrite = nframes - itemswritten, nitems, nbytes;
thiswrite = (thiswrite > bufframes ? bufframes : thiswrite);
soundfile_xferout(argc, vecs, (unsigned char *)sampbuf, thiswrite,
--- 2150,2154 ----
for (itemswritten = 0; itemswritten < nframes; )
{
! int thiswrite = nframes - itemswritten, nbytes;
thiswrite = (thiswrite > bufframes ? bufframes : thiswrite);
soundfile_xferout(argc, vecs, (unsigned char *)sampbuf, thiswrite,
***************
*** 2351,2355 ****
else if (x->x_requestcode == REQUEST_OPEN)
{
- char boo[80];
int sysrtn, wantbytes;
--- 2348,2351 ----
***************
*** 2668,2672 ****
if (x->x_state == STATE_STREAM)
{
! int wantbytes, nchannels, sfchannels = x->x_sfchannels;
pthread_mutex_lock(&x->x_mutex);
wantbytes = sfchannels * vecsize * bytespersample;
--- 2664,2668 ----
if (x->x_state == STATE_STREAM)
{
! int wantbytes, sfchannels = x->x_sfchannels;
pthread_mutex_lock(&x->x_mutex);
wantbytes = sfchannels * vecsize * bytespersample;
***************
*** 2734,2738 ****
else
{
- idle:
for (i = 0; i < noutlets; i++)
for (j = vecsize, fp = x->x_outvec[i]; j--; )
--- 2730,2733 ----
***************
*** 2901,2916 ****
else if (x->x_requestcode == REQUEST_OPEN)
{
- char boo[80];
int fd, sysrtn, writebytes;
/* copy file stuff out of the data structure so we can
relinquish the mutex while we're in open_soundfile(). */
- long onsetframes = x->x_onsetframes;
- long bytelimit = 0x7fffffff;
- int skipheaderbytes = x->x_skipheaderbytes;
int bytespersample = x->x_bytespersample;
int sfchannels = x->x_sfchannels;
- int bigendian = x->x_bigendian;
int filetype = x->x_filetype;
char *filename = x->x_filename;
t_canvas *canvas = x->x_canvas;
--- 2896,2907 ----
else if (x->x_requestcode == REQUEST_OPEN)
{
int fd, sysrtn, writebytes;
/* copy file stuff out of the data structure so we can
relinquish the mutex while we're in open_soundfile(). */
int bytespersample = x->x_bytespersample;
int sfchannels = x->x_sfchannels;
int filetype = x->x_filetype;
+ int bigendian = x->x_bigendian;
char *filename = x->x_filename;
t_canvas *canvas = x->x_canvas;
***************
*** 2931,2935 ****
{
int bytesperframe = x->x_bytespersample * x->x_sfchannels;
- int bigendian = x->x_bigendian;
char *filename = x->x_filename;
int fd = x->x_fd;
--- 2922,2925 ----
***************
*** 2959,2963 ****
pthread_mutex_unlock(&x->x_mutex);
fd = create_soundfile(canvas, filename, filetype, 0,
! bytespersample, bigendian, sfchannels,
garray_ambigendian() != bigendian, samplerate);
pthread_mutex_lock(&x->x_mutex);
--- 2949,2953 ----
pthread_mutex_unlock(&x->x_mutex);
fd = create_soundfile(canvas, filename, filetype, 0,
! bytespersample, x->x_bigendian, sfchannels,
garray_ambigendian() != bigendian, samplerate);
pthread_mutex_lock(&x->x_mutex);
***************
*** 3073,3077 ****
{
int bytesperframe = x->x_bytespersample * x->x_sfchannels;
- int bigendian = x->x_bigendian;
char *filename = x->x_filename;
int fd = x->x_fd;
--- 3063,3066 ----
***************
*** 3110,3115 ****
/******** the object proper runs in the calling (parent) thread ****/
- static void writesf_tick(t_writesf *x);
-
static void *writesf_new(t_floatarg fnchannels, t_floatarg fbufsize)
{
--- 3099,3102 ----
***************
*** 3157,3164 ****
{
t_writesf *x = (t_writesf *)(w[1]);
! int vecsize = x->x_vecsize, sfchannels = x->x_sfchannels, i, j,
bytespersample = x->x_bytespersample,
bigendian = x->x_bigendian;
- float *fp;
if (x->x_state == STATE_STREAM)
{
--- 3144,3150 ----
{
t_writesf *x = (t_writesf *)(w[1]);
! int vecsize = x->x_vecsize, sfchannels = x->x_sfchannels,
bytespersample = x->x_bytespersample,
bigendian = x->x_bigendian;
if (x->x_state == STATE_STREAM)
{
Index: d_mayer_fft.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_mayer_fft.c,v
retrieving revision 1.2.4.1
retrieving revision 1.2.4.1.2.1
diff -C2 -d -r1.2.4.1 -r1.2.4.1.2.1
*** d_mayer_fft.c 21 May 2005 13:14:54 -0000 1.2.4.1
--- d_mayer_fft.c 27 Nov 2005 07:59:05 -0000 1.2.4.1.2.1
***************
*** 398,402 ****
void mayer_realfft(int n, REAL *real)
{
! REAL a,b,c,d;
int i,j,k;
mayer_fht(real,n);
--- 398,402 ----
void mayer_realfft(int n, REAL *real)
{
! REAL a,b;
int i,j,k;
mayer_fht(real,n);
***************
*** 411,415 ****
void mayer_realifft(int n, REAL *real)
{
! REAL a,b,c,d;
int i,j,k;
for (i=1,j=n-1,k=n/2;i<k;i++,j--) {
--- 411,415 ----
void mayer_realifft(int n, REAL *real)
{
! REAL a,b;
int i,j,k;
for (i=1,j=n-1,k=n/2;i<k;i++,j--) {
Index: d_ugen.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_ugen.c,v
retrieving revision 1.3.4.1.2.3
retrieving revision 1.3.4.1.2.4
diff -C2 -d -r1.3.4.1.2.3 -r1.3.4.1.2.4
*** d_ugen.c 28 Oct 2005 11:34:14 -0000 1.3.4.1.2.3
--- d_ugen.c 27 Nov 2005 07:59:05 -0000 1.3.4.1.2.4
***************
*** 350,356 ****
void signal_cleanup(void)
{
! t_signal **svec, *sig, *sig2;
int i;
! while (sig = signal_usedlist)
{
signal_usedlist = sig->s_nextused;
--- 350,356 ----
void signal_cleanup(void)
{
! t_signal *sig;
int i;
! while ((sig = signal_usedlist))
{
signal_usedlist = sig->s_nextused;
***************
*** 423,429 ****
t_signal *signal_new(int n, float sr)
{
! int logn, n2;
t_signal *ret, **whichlist;
- t_sample *fp;
logn = ilog2(n);
if (n)
--- 423,428 ----
t_signal *signal_new(int n, float sr)
{
! int logn;
t_signal *ret, **whichlist;
logn = ilog2(n);
if (n)
***************
*** 439,444 ****
/* first try to reclaim one from the free list */
! if (ret = *whichlist)
! *whichlist = ret->s_nextfree;
else
{
--- 438,443 ----
/* first try to reclaim one from the free list */
! ret = *whichlist;
! if (ret) *whichlist = ret->s_nextfree;
else
{
***************
*** 551,556 ****
void ugen_stop(void)
{
- t_signal *s;
- int i;
if (dsp_chain)
{
--- 550,553 ----
***************
*** 608,616 ****
{
t_dspcontext *dc = (t_dspcontext *)getbytes(sizeof(*dc));
- float parent_srate, srate;
- int parent_vecsize, vecsize;
-
if (ugen_loud) post("ugen_start_graph...");
-
dc->dc_ugenlist = 0;
dc->dc_toplevel = toplevel;
--- 605,609 ----
***************
*** 703,707 ****
t_sigoutlet *uout;
t_siginlet *uin;
! t_sigoutconnect *oc, *oc2;
t_class *klass = pd_class(&u->u_obj->ob_pd);
int i, n;
--- 696,700 ----
t_sigoutlet *uout;
t_siginlet *uin;
! t_sigoutconnect *oc;
t_class *klass = pd_class(&u->u_obj->ob_pd);
int i, n;
***************
*** 731,735 ****
/* post("%s: unconnected signal inlet set to zero",
class_getname(u->u_obj->ob_pd)); */
! if (scalar = obj_findsignalscalar(u->u_obj, i))
dsp_add_scalarcopy(scalar, s3->s_vec, s3->s_n);
else
--- 724,728 ----
/* post("%s: unconnected signal inlet set to zero",
class_getname(u->u_obj->ob_pd)); */
! if ((scalar = obj_findsignalscalar(u->u_obj, i)))
dsp_add_scalarcopy(scalar, s3->s_vec, s3->s_n);
else
***************
*** 811,815 ****
uin = &u2->u_in[oc->oc_inno];
/* if there's already someone here, sum the two */
! if (s2 = uin->i_signal)
{
s1->s_refcount--;
--- 804,808 ----
uin = &u2->u_in[oc->oc_inno];
/* if there's already someone here, sum the two */
! if ((s2 = uin->i_signal))
{
s1->s_refcount--;
***************
*** 855,859 ****
void ugen_done_graph(t_dspcontext *dc)
{
! t_ugenbox *u, *u2;
t_sigoutlet *uout;
t_siginlet *uin;
--- 848,852 ----
void ugen_done_graph(t_dspcontext *dc)
{
! t_ugenbox *u;
t_sigoutlet *uout;
t_siginlet *uin;
***************
*** 996,1000 ****
{
t_pd *zz = &u->u_obj->ob_pd;
! t_signal **insigs = dc->dc_iosigs, **outsigs = dc->dc_iosigs;
if (outsigs) outsigs += dc->dc_ninlets;
--- 989,993 ----
{
t_pd *zz = &u->u_obj->ob_pd;
! t_signal **outsigs = dc->dc_iosigs;
if (outsigs) outsigs += dc->dc_ninlets;
Index: d_delay.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_delay.c,v
retrieving revision 1.2.4.6
retrieving revision 1.2.4.6.2.1
diff -C2 -d -r1.2.4.6 -r1.2.4.6.2.1
*** d_delay.c 18 Jan 2005 15:25:01 -0000 1.2.4.6
--- d_delay.c 27 Nov 2005 07:59:05 -0000 1.2.4.6.2.1
***************
*** 12,16 ****
#define DEFDELVS 64 /* LATER get this from canvas at DSP time */
- static int delread_zero = 0; /* four bytes of zero for delread~, vd~ */
/* ----------------------------- delwrite~ ----------------------------- */
--- 12,15 ----
***************
*** 236,240 ****
static void sigdelread_float(t_sigdelread *x, t_float f)
{
- int samps;
t_sigdelwrite *delwriter =
(t_sigdelwrite *)pd_findbyclass(x->x_sym, sigdelwrite_class);
--- 235,238 ----
***************
*** 242,246 ****
if (delwriter)
{
- int delsize = delwriter->x_cspace.c_n;
x->x_delsamps = (int)(0.5 + x->x_sr * x->x_deltime)
+ x->x_n - x->x_zerodel;
--- 240,243 ----
Index: d_osc.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/d_osc.c,v
retrieving revision 1.2.4.1.2.2
retrieving revision 1.2.4.1.2.3
diff -C2 -d -r1.2.4.1.2.2 -r1.2.4.1.2.3
*** d_osc.c 2 Aug 2005 21:25:03 -0000 1.2.4.1.2.2
--- d_osc.c 27 Nov 2005 07:59:05 -0000 1.2.4.1.2.3
***************
*** 64,68 ****
/* -------------------------- phasor~ ------------------------------ */
! static t_class *phasor_class, *scalarphasor_class;
#if 1 /* in the style of R. Hoeldrich (ICMC 1995 Banff) */
--- 64,68 ----
/* -------------------------- phasor~ ------------------------------ */
! static t_class *phasor_class;
#if 1 /* in the style of R. Hoeldrich (ICMC 1995 Banff) */
***************
*** 243,247 ****
/* ------------------------ osc~ ----------------------------- */
! static t_class *osc_class, *scalarosc_class;
typedef struct _osc
--- 243,247 ----
/* ------------------------ osc~ ----------------------------- */
! static t_class *osc_class;
typedef struct _osc