Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4649
Modified Files: Tag: desiredata s_audio.c s_inter.c Log Message: cleanup
Index: s_inter.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_inter.c,v retrieving revision 1.5.4.10.2.25.2.18 retrieving revision 1.5.4.10.2.25.2.19 diff -C2 -d -r1.5.4.10.2.25.2.18 -r1.5.4.10.2.25.2.19 *** s_inter.c 28 Jun 2007 06:21:23 -0000 1.5.4.10.2.25.2.18 --- s_inter.c 30 Jun 2007 22:40:13 -0000 1.5.4.10.2.25.2.19 *************** *** 243,255 ****
#if defined(__linux) || defined(__APPLE__) - #if (_POSIX_PRIORITY_SCHEDULING - 0) >= 200112L || (_POSIX_MEMLOCK - 0) >= 200112L #include <sched.h> #endif - #if (_POSIX_MEMLOCK - 0) >= 200112L #include <sys/resource.h> #endif - void sys_set_priority(int higher) { #if (_POSIX_PRIORITY_SCHEDULING - 0) >= 200112L --- 243,252 ---- *************** *** 258,262 **** p1 = sched_get_priority_min(SCHED_FIFO); p2 = sched_get_priority_max(SCHED_FIFO); ! #ifdef USEAPI_JACK p3 = (higher ? p1 + 7 : p1 + 5); #else --- 255,259 ---- p1 = sched_get_priority_min(SCHED_FIFO); p2 = sched_get_priority_max(SCHED_FIFO); ! #ifdef USEAPI_JACK p3 = (higher ? p1 + 7 : p1 + 5); #else *************** *** 267,271 **** fprintf(stderr, "priority %d scheduling enabled.\n", p3); #endif - #if (_POSIX_MEMLOCK - 0) >= 200112L /* tb: force memlock to physical memory { */ --- 264,267 ---- *************** *** 278,284 **** if (mlockall(MCL_FUTURE) != -1) fprintf(stderr, "memory locking enabled.\n"); #endif - } - #endif /* __linux__ */
--- 274,278 ---- *************** *** 327,332 **** int size = nfd * sizeof(t_fdpoll); t_fdpoll *fp; ! sys_fdpoll = (t_fdpoll *)t_resizebytes(sys_fdpoll, size, ! size + sizeof(t_fdpoll)); fp = sys_fdpoll + nfd; fp->fdp_fd = fd; --- 321,325 ---- int size = nfd * sizeof(t_fdpoll); t_fdpoll *fp; ! sys_fdpoll = (t_fdpoll *)t_resizebytes(sys_fdpoll, size, size + sizeof(t_fdpoll)); fp = sys_fdpoll + nfd; fp->fdp_fd = fd; *************** *** 367,371 **** x->obuf = 0; x->next = 0; ! if (!(x->inbuf = (char *)malloc(INBUFSIZE))) bug("t_socketreceiver");; return x; } --- 360,365 ---- x->obuf = 0; x->next = 0; ! x->inbuf = (char *)malloc(INBUFSIZE); ! if (!x->inbuf) bug("t_socketreceiver"); return x; } *************** *** 408,413 **** if (buf[ret-1] == '\n') { char *semi = strchr(buf, ';'); ! if (semi) ! *semi = 0; binbuf_text(inbinbuf, buf, strlen(buf)); outlet_setstacklim(); --- 402,406 ---- if (buf[ret-1] == '\n') { char *semi = strchr(buf, ';'); ! if (semi) *semi = 0; binbuf_text(inbinbuf, buf, strlen(buf)); outlet_setstacklim(); *************** *** 754,756 **** return 0; /* avoid warning */ } - --- 747,748 ----
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.5.4.16.2.20.2.10 retrieving revision 1.5.4.16.2.20.2.11 diff -C2 -d -r1.5.4.16.2.20.2.10 -r1.5.4.16.2.20.2.11 *** s_audio.c 30 Jun 2007 22:09:45 -0000 1.5.4.16.2.20.2.10 --- s_audio.c 30 Jun 2007 22:40:13 -0000 1.5.4.16.2.20.2.11 *************** *** 548,569 **** extern void sgi_listaudiodevs(void); void sys_listdevs(void) { - #ifdef USEAPI_PORTAUDIO if (sys_audioapi == API_PORTAUDIO) sys_listaudiodevs(); else - #endif #ifdef USEAPI_JACK if (sys_audioapi == API_JACK) jack_listdevs(); else #endif - #ifdef USEAPI_OSS if (sys_audioapi == API_OSS) sys_listaudiodevs(); else - #endif - #ifdef USEAPI_ALSA if (sys_audioapi == API_ALSA) sys_listaudiodevs(); else - #endif #ifdef USEAPI_SGI if (sys_audioapi == API_SGI) sgi_listaudiodevs(); else #endif - #ifdef USEAPI_MMIO if (sys_audioapi == API_MMIO) sys_listaudiodevs(); else - #endif post("unknown API"); sys_listmididevs(); --- 548,561 ---- *************** *** 705,713 ****
void glob_audio_scheduler(t_pd * dummy, t_float f) { ! int naudioindev; int audioindev[MAXAUDIOINDEV]; int audiochindev[MAXAUDIOINDEV]; ! int naudiooutdev; int audiooutdev[MAXAUDIOOUTDEV]; int audiochoutdev[MAXAUDIOOUTDEV]; ! int rate, dacblocksize, advance, scheduler; /* dummy */ if ((int)f == sys_callbackscheduler) return; ! scheduler = (f != 0) ? 1 : 0; sys_get_audio_params(&naudioindev, audioindev, audiochindev, &naudiooutdev, audiooutdev, audiochoutdev, &rate, &dacblocksize, &advance, &scheduler); --- 697,705 ----
void glob_audio_scheduler(t_pd * dummy, t_float f) { ! int naudioindev, audioindev[MAXAUDIOINDEV], audiochindev[MAXAUDIOINDEV]; ! int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], audiochoutdev[MAXAUDIOOUTDEV]; ! int rate, dacblocksize, advance, scheduler; if ((int)f == sys_callbackscheduler) return; ! scheduler = f!=0; sys_get_audio_params(&naudioindev, audioindev, audiochindev, &naudiooutdev, audiooutdev, audiochoutdev, &rate, &dacblocksize, &advance, &scheduler); *************** *** 724,728 **** }
- void glob_audio_device(t_pd * dummy, t_symbol *s, int argc, t_atom *argv) { int naudioindev, audioindev[MAXAUDIOINDEV], audiochindev[MAXAUDIOINDEV]; --- 716,719 ----