[PD-cvs] pd/src kernel.c, 1.1.2.44, 1.1.2.45 s_audio.c, 1.5.4.16.2.20.2.6, 1.5.4.16.2.20.2.7 s_audio_alsa.c, 1.5.4.5.2.2.2.2, 1.5.4.5.2.2.2.3
Mathieu Bouchard
matju at users.sourceforge.net
Thu Jun 28 07:26:52 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29966
Modified Files:
Tag: desiredata
kernel.c s_audio.c s_audio_alsa.c
Log Message:
cleanup
Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.44
retrieving revision 1.1.2.45
diff -C2 -d -r1.1.2.44 -r1.1.2.45
*** kernel.c 28 Jun 2007 03:07:31 -0000 1.1.2.44
--- kernel.c 28 Jun 2007 05:26:48 -0000 1.1.2.45
***************
*** 191,195 ****
}
! /*extern "C"*/ void hash_setup (void) {
hash_class = class_new(gensym("#V"), (t_newmethod)0 /*hash_new*/,
(t_method)hash_free, sizeof(t_object), CLASS_PD, A_GIMME, 0);
--- 191,195 ----
}
! /*extern "C"*/ void hash_setup () {
hash_class = class_new(gensym("#V"), (t_newmethod)0 /*hash_new*/,
(t_method)hash_free, sizeof(t_object), CLASS_PD, A_GIMME, 0);
***************
*** 660,664 ****
}
! void obj_init(void) {
inlet_class = class_new(gensym("inlet"), 0, 0, sizeof(t_inlet), CLASS_PD, 0);
floatinlet_class = class_new(gensym("inlet"), 0, 0, sizeof(t_inlet), CLASS_PD, 0);
--- 660,664 ----
}
! void obj_init () {
inlet_class = class_new(gensym("inlet"), 0, 0, sizeof(t_inlet), CLASS_PD, 0);
floatinlet_class = class_new(gensym("inlet"), 0, 0, sizeof(t_inlet), CLASS_PD, 0);
***************
*** 684,688 ****
/* this is fairly obsolete stuff, I think */
static int outlet_eventno;
! void outlet_setstacklim(void) {outlet_eventno++;}
int sched_geteventno( void) {return outlet_eventno;}
--- 684,688 ----
/* this is fairly obsolete stuff, I think */
static int outlet_eventno;
! void outlet_setstacklim () {outlet_eventno++;}
int sched_geteventno( void) {return outlet_eventno;}
***************
*** 1402,1406 ****
/* This is externally available, but note that it might later disappear; the
whole "newest" thing is a hack which needs to be redesigned. */
! t_pd *pd_newest(void) {return newest;}
/* horribly, we need prototypes for each of the artificial function
--- 1402,1406 ----
/* This is externally available, but note that it might later disappear; the
whole "newest" thing is a hack which needs to be redesigned. */
! t_pd *pd_newest () {return newest;}
/* horribly, we need prototypes for each of the artificial function
***************
*** 1560,1564 ****
}
! void nullfn(void) {}
t_gotfn getfn(t_pd *x, t_symbol *s) {
--- 1560,1564 ----
}
! void nullfn () {}
t_gotfn getfn(t_pd *x, t_symbol *s) {
***************
*** 1630,1634 ****
t_class *binbuf_class;
! t_binbuf *binbuf_new(void) {
t_binbuf *x = (t_binbuf *)pd_new(binbuf_class);
x->n = 0;
--- 1630,1634 ----
t_class *binbuf_class;
! t_binbuf *binbuf_new () {
t_binbuf *x = (t_binbuf *)pd_new(binbuf_class);
x->n = 0;
***************
*** 1955,1959 ****
t_atom *binbuf_getvec(t_binbuf *x) {return x->v;}
! int canvas_getdollarzero(void);
/* JMZ:
--- 1955,1959 ----
t_atom *binbuf_getvec(t_binbuf *x) {return x->v;}
! int canvas_getdollarzero ();
/* JMZ:
Index: s_audio_alsa.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.c,v
retrieving revision 1.5.4.5.2.2.2.2
retrieving revision 1.5.4.5.2.2.2.3
diff -C2 -d -r1.5.4.5.2.2.2.2 -r1.5.4.5.2.2.2.3
*** s_audio_alsa.c 20 Dec 2006 07:58:01 -0000 1.5.4.5.2.2.2.2
--- s_audio_alsa.c 28 Jun 2007 05:26:49 -0000 1.5.4.5.2.2.2.3
***************
*** 389,393 ****
static double timenow;
double timelast;
! t_sample *fp, *fp1, *fp2;
int i, j, k, iodev, result, ch;
int chansintogo, chansouttogo;
--- 389,393 ----
static double timenow;
double timelast;
! t_sample *fp1, *fp2;
int i, j, k, iodev, result, ch;
int chansintogo, chansouttogo;
***************
*** 647,659 ****
/* call this only if both input and output are open */
! static void alsa_checkiosync( void)
! {
! int i, result, giveup = 1000, alreadylogged = 0, iodev = 0;
snd_pcm_sframes_t minphase, maxphase, thisphase, outdelay;
!
! while (1)
! {
! if (giveup-- <= 0)
! {
post("tried but couldn't sync A/D/A");
alsa_jittermax += 1;
--- 647,655 ----
/* call this only if both input and output are open */
! static void alsa_checkiosync( void) {
! int result, giveup = 1000, alreadylogged = 0, iodev = 0;
snd_pcm_sframes_t minphase, maxphase, thisphase, outdelay;
! while (1) {
! if (giveup-- <= 0) {
post("tried but couldn't sync A/D/A");
alsa_jittermax += 1;
***************
*** 662,701 ****
minphase = 0x7fffffff;
maxphase = -0x7fffffff;
! for (iodev = 0; iodev < alsa_noutdev; iodev++)
! {
result = snd_pcm_delay(alsa_outdev[iodev].a_handle, &outdelay);
! if (result < 0)
! {
snd_pcm_prepare(alsa_outdev[iodev].a_handle);
result = snd_pcm_delay(alsa_outdev[iodev].a_handle, &outdelay);
}
! if (result < 0)
! {
post("output snd_pcm_delay failed: %s", snd_strerror(result));
! if (snd_pcm_status(alsa_outdev[iodev].a_handle,
! alsa_status) < 0)
post("output snd_pcm_status failed");
! else post("astate %d",
! snd_pcm_status_get_state(alsa_status));
return;
}
thisphase = alsa_buf_samps - outdelay;
! if (thisphase < minphase)
! minphase = thisphase;
! if (thisphase > maxphase)
! maxphase = thisphase;
if (outdelay < 0)
sys_log_error(ERR_DATALATE), alreadylogged = 1;
}
! for (iodev = 0; iodev < alsa_nindev; iodev++)
! {
result = snd_pcm_delay(alsa_indev[iodev].a_handle, &thisphase);
! if (result < 0)
! {
snd_pcm_prepare(alsa_indev[iodev].a_handle);
result = snd_pcm_delay(alsa_indev[iodev].a_handle, &thisphase);
}
! if (result < 0)
! {
post("output snd_pcm_delay failed: %s", snd_strerror(result));
if (snd_pcm_status(alsa_outdev[iodev].a_handle,
--- 658,687 ----
minphase = 0x7fffffff;
maxphase = -0x7fffffff;
! for (iodev=0; iodev<alsa_noutdev; iodev++) {
result = snd_pcm_delay(alsa_outdev[iodev].a_handle, &outdelay);
! if (result < 0) {
snd_pcm_prepare(alsa_outdev[iodev].a_handle);
result = snd_pcm_delay(alsa_outdev[iodev].a_handle, &outdelay);
}
! if (result < 0) {
post("output snd_pcm_delay failed: %s", snd_strerror(result));
! if (snd_pcm_status(alsa_outdev[iodev].a_handle, alsa_status) < 0)
post("output snd_pcm_status failed");
! else post("astate %d", snd_pcm_status_get_state(alsa_status));
return;
}
thisphase = alsa_buf_samps - outdelay;
! if (thisphase < minphase) minphase = thisphase;
! if (thisphase > maxphase) maxphase = thisphase;
if (outdelay < 0)
sys_log_error(ERR_DATALATE), alreadylogged = 1;
}
! for (iodev=0; iodev<alsa_nindev; iodev++) {
result = snd_pcm_delay(alsa_indev[iodev].a_handle, &thisphase);
! if (result < 0) {
snd_pcm_prepare(alsa_indev[iodev].a_handle);
result = snd_pcm_delay(alsa_indev[iodev].a_handle, &thisphase);
}
! if (result < 0) {
post("output snd_pcm_delay failed: %s", snd_strerror(result));
if (snd_pcm_status(alsa_outdev[iodev].a_handle,
***************
*** 706,713 ****
return;
}
! if (thisphase < minphase)
! minphase = thisphase;
! if (thisphase > maxphase)
! maxphase = thisphase;
}
/* the "correct" position is for all the phases to be exactly
--- 692,697 ----
return;
}
! if (thisphase < minphase) minphase = thisphase;
! if (thisphase > maxphase) maxphase = thisphase;
}
/* the "correct" position is for all the phases to be exactly
Index: s_audio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v
retrieving revision 1.5.4.16.2.20.2.6
retrieving revision 1.5.4.16.2.20.2.7
diff -C2 -d -r1.5.4.16.2.20.2.6 -r1.5.4.16.2.20.2.7
*** s_audio.c 20 Dec 2006 09:40:11 -0000 1.5.4.16.2.20.2.6
--- s_audio.c 28 Jun 2007 05:26:48 -0000 1.5.4.16.2.20.2.7
***************
*** 189,193 ****
int *choutdev, int rate, int dacblocksize, int advance, int schedmode, int enable)
{
! int i, *ip;
int defaultchannels = SYS_DEFAULTCH;
int inchans, outchans;
--- 189,193 ----
int *choutdev, int rate, int dacblocksize, int advance, int schedmode, int enable)
{
! int i;
int defaultchannels = SYS_DEFAULTCH;
int inchans, outchans;
***************
*** 522,527 ****
/* start an audio settings dialog window */
void glob_audio_properties(t_pd *dummy, t_floatarg flongform) {
! char buf[1024 + 2 * MAXNDEV*(DEVDESCSIZE+4)];
! /* these are the devices you're using: */
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
--- 522,526 ----
/* start an audio settings dialog window */
void glob_audio_properties(t_pd *dummy, t_floatarg flongform) {
! /* these are the devices you're using: */
int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV];
int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV];
***************
*** 531,535 ****
audiooutchan1, audiooutchan2, audiooutchan3, audiooutchan4;
int rate, dacblocksize, advance, scheduler;
! /* these are all the devices on your system: */
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, canmulti = 0, i;
--- 530,534 ----
audiooutchan1, audiooutchan2, audiooutchan3, audiooutchan4;
int rate, dacblocksize, advance, scheduler;
! /* these are all the devices on your system: */
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, canmulti = 0, i;
More information about the Pd-cvs
mailing list