Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9465
Modified Files: Tag: devel_0_39 s_audio.c s_audio_alsa.c s_audio_alsamm.c s_audio_jack.c s_audio_oss.c s_audio_pa.c s_audio_pablio.c Log Message: fixed warnings
Index: s_audio_jack.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_jack.c,v retrieving revision 1.5.4.8.2.3 retrieving revision 1.5.4.8.2.4 diff -C2 -d -r1.5.4.8.2.3 -r1.5.4.8.2.4 *** s_audio_jack.c 16 Jul 2005 11:02:37 -0000 1.5.4.8.2.3 --- s_audio_jack.c 27 Nov 2005 08:08:28 -0000 1.5.4.8.2.4 *************** *** 104,114 **** int status = sys_timedlock(timeout); ! if (status) if (status == ETIMEDOUT) /* we're late ... lets hope that jack doesn't kick us out */ { - static int k = 0; post("timeout %d", (timeout)); - sys_log_error(ERR_SYSLOCK); return 0; --- 104,112 ---- int status = sys_timedlock(timeout); ! if (status) { if (status == ETIMEDOUT) /* we're late ... lets hope that jack doesn't kick us out */ { post("timeout %d", (timeout)); sys_log_error(ERR_SYSLOCK); return 0; *************** *** 119,123 **** return 0; } ! for (i = 0; i != dspticks_per_jacktick; ++i) { --- 117,121 ---- return 0; } ! } for (i = 0; i != dspticks_per_jacktick; ++i) { *************** *** 169,173 **** static t_int jack_shutdown_handler(t_int* none) { - int i; post("jack kicked us out ... trying to reconnect"); jack_ignore_graph_callback = 1; --- 167,170 ----
Index: s_audio_pablio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_pablio.c,v retrieving revision 1.1.4.2 retrieving revision 1.1.4.2.2.1 diff -C2 -d -r1.1.4.2 -r1.1.4.2.2.1 *** s_audio_pablio.c 16 May 2005 13:36:23 -0000 1.1.4.2 --- s_audio_pablio.c 27 Nov 2005 08:08:28 -0000 1.1.4.2.2.1 *************** *** 194,208 ****
/************************************************************/ static unsigned long RoundUpToNextPowerOf2( unsigned long n ) { long numBits = 0; ! if( ((n-1) & n) == 0) return n; /* Already Power of two. */ ! while( n > 0 ) ! { ! n= n>>1; ! numBits++; ! } return (1<<numBits); }
/************************************************************ --- 194,206 ----
/************************************************************/ + /* static unsigned long RoundUpToNextPowerOf2( unsigned long n ) { long numBits = 0; ! if( ((n-1) & n) == 0) return n; // Already Power of two. ! while(n>0) {n>>=1; numBits++;} return (1<<numBits); } + */
/************************************************************
Index: s_audio_alsa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsa.c,v retrieving revision 1.5.4.5 retrieving revision 1.5.4.5.2.1 diff -C2 -d -r1.5.4.5 -r1.5.4.5.2.1 *** s_audio_alsa.c 23 Feb 2005 22:28:26 -0000 1.5.4.5 --- s_audio_alsa.c 27 Nov 2005 08:08:28 -0000 1.5.4.5.2.1 *************** *** 28,31 **** --- 28,32 ----
/* Defines */ + #undef DEBUG #define DEBUG(x) x #define DEBUG2(x) {x;} *************** *** 230,241 **** int *choutdev, int rate) { ! int err, inchans = 0, outchans = 0, subunitdir; char devname[512]; - snd_output_t* out; int frag_size = (sys_blocksize ? sys_blocksize : ALSA_DEFFRAGSIZE); ! int nfrags, i, iodev, dev2; ! int wantinchans, wantoutchans, device; ! ! nfrags = sys_schedadvance * (float)rate / (1e6 * frag_size); /* save our belief as to ALSA's buffer size for later */ alsa_buf_samps = nfrags * frag_size; --- 231,239 ---- int *choutdev, int rate) { ! int err, inchans = 0, outchans = 0; char devname[512]; int frag_size = (sys_blocksize ? sys_blocksize : ALSA_DEFFRAGSIZE); ! int i, iodev, dev2; ! int nfrags = sys_schedadvance * (float)rate / (1e6 * frag_size); /* save our belief as to ALSA's buffer size for later */ alsa_buf_samps = nfrags * frag_size; *************** *** 388,393 **** static double timenow; double timelast; ! t_sample *fp, *fp1, *fp2; ! int i, j, k, err, iodev, result, ch; int chansintogo, chansouttogo; unsigned int transfersize; --- 386,391 ---- static double timenow; double timelast; ! t_sample *fp1, *fp2; ! int i, j, k, iodev, result, ch; int chansintogo, chansouttogo; unsigned int transfersize; *************** *** 564,568 **** void alsa_printstate( void) { ! int i, result, iodev = 0; snd_pcm_sframes_t indelay, outdelay; if (sys_audioapi != API_ALSA) --- 562,566 ---- void alsa_printstate( void) { ! int result, iodev = 0; snd_pcm_sframes_t indelay, outdelay; if (sys_audioapi != API_ALSA) *************** *** 648,652 **** static void alsa_checkiosync( void) { ! int i, result, giveup = 1000, alreadylogged = 0, iodev = 0; snd_pcm_sframes_t minphase, maxphase, thisphase, outdelay;
--- 646,650 ---- static void alsa_checkiosync( void) { ! int result, giveup = 1000, alreadylogged = 0, iodev = 0; snd_pcm_sframes_t minphase, maxphase, thisphase, outdelay;
Index: s_audio_oss.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_oss.c,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.2.2.1 diff -C2 -d -r1.6.4.2 -r1.6.4.2.2.1 *** s_audio_oss.c 29 Apr 2005 21:20:28 -0000 1.6.4.2 --- s_audio_oss.c 27 Nov 2005 08:08:28 -0000 1.6.4.2.2.1 *************** *** 25,28 **** --- 25,29 ----
/* Defines */ + #undef DEBUG #define DEBUG(x) x #define DEBUG2(x) {x;} *************** *** 42,48 ****
/* GLOBALS */ - static int linux_meters; /* true if we're metering */ - static float linux_inmax; /* max input amplitude */ - static float linux_outmax; /* max output amplitude */ static int linux_fragsize = 0; /* for block mode; block size (sample frames) */
--- 43,46 ---- *************** *** 72,76 **** static int oss_blockmode = 0; /* flag to use "blockmode" */ static int oss_32bit = 0; /* allow 23 bit transfers in OSS */ - static char ossdsp[] = "/dev/dsp%d";
/* don't assume we can turn all 31 bits when doing float-to-fix; --- 70,73 ---- *************** *** 140,147 **** void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize) { /* IOhannes */ ! int orig, param, nblk, fd = dev->d_fd, wantformat; int nchannels = dev->d_nchannels; - int advwas = sys_schedadvance; - audio_buf_info ainfo;
--- 137,142 ---- void oss_configure(t_oss_dev *dev, int srate, int dac, int skipblocksize) { /* IOhannes */ ! int orig, param, fd = dev->d_fd, wantformat; int nchannels = dev->d_nchannels; audio_buf_info ainfo;
*************** *** 276,284 **** int n, i, fd, flags; char buf[OSS_MAXSAMPLEWIDTH * sys_dacblocksize * OSS_MAXCHPERDEV]; - int num_devs = 0; int wantmore=0; - int spread = 0; - audio_buf_info ainfo; - linux_nindevs = linux_noutdevs = 0; /* mark devices unopened */ --- 271,275 ---- *************** *** 552,556 **** static void oss_doresync( void) { ! int dev, zeroed = 0, wantsize; char buf[OSS_MAXSAMPLEWIDTH * sys_dacblocksize * OSS_MAXCHPERDEV]; audio_buf_info ainfo; --- 543,547 ---- static void oss_doresync( void) { ! int dev, zeroed = 0; char buf[OSS_MAXSAMPLEWIDTH * sys_dacblocksize * OSS_MAXCHPERDEV]; audio_buf_info ainfo; *************** *** 631,635 **** { float *fp1, *fp2; - long fill; int i, j, dev, rtnval = SENDDACS_YES; char buf[OSS_MAXSAMPLEWIDTH * sys_dacblocksize * OSS_MAXCHPERDEV]; --- 622,625 ---- *************** *** 676,680 **** if (linux_adcs[dev].d_space == 0) { - audio_buf_info ainfo; sys_microsleep(sys_sleepgrain); /* tb: changed to sys_sleepgrain */ oss_calcspace(); --- 666,669 ----
Index: s_audio_alsamm.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsamm.c,v retrieving revision 1.1.4.5 retrieving revision 1.1.4.5.2.1 diff -C2 -d -r1.1.4.5 -r1.1.4.5.2.1 *** s_audio_alsamm.c 1 Mar 2005 18:58:00 -0000 1.1.4.5 --- s_audio_alsamm.c 27 Nov 2005 08:08:28 -0000 1.1.4.5.2.1 *************** *** 82,89 **** --- 82,91 ---- */
+ /* static int alsamm_incards = 0; static t_alsa_dev *alsamm_indevice[ALSA_MAXDEV]; static int alsamm_outcards = 0; static t_alsa_dev *alsamm_outdevice[ALSA_MAXDEV]; + */
/* *************** *** 158,168 **** } #else ! #define DEBUG(x) ! #define DEBUG2(x) {} #endif
/* protos */ - static char *alsamm_getdev(int nr); - static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, int *chs); --- 160,169 ---- } #else ! #undef DEBUG ! #define DEBUG(x) ! #define DEBUG2(x) {} #endif
/* protos */ static int set_hwparams(snd_pcm_t *handle, snd_pcm_hw_params_t *params, int *chs); *************** *** 185,190 **** { int err; - char devname[80]; - char *cardname; snd_pcm_hw_params_t* hw_params; snd_pcm_sw_params_t* sw_params; --- 186,189 ---- *************** *** 197,203 ****
int i; - short* tmp_buf; - unsigned int tmp_uint; - snd_pcm_hw_params_alloca(&hw_params); snd_pcm_sw_params_alloca(&sw_params); --- 196,199 ---- *************** *** 322,327 ****
for(i=0; i<(alsa_noutdev < alsa_nindev ? alsa_noutdev:alsa_nindev); i++){ - t_alsa_dev *ad = &alsa_outdev[i]; - if (alsa_outdev[i].a_devno == alsa_indev[i].a_devno){ if ((err = snd_pcm_link (alsa_indev[i].a_handle, --- 318,321 ---- *************** *** 430,435 **** unsigned int rrate; int err, dir; - int channels_allocated = 0; - /* choose all parameters */ err = snd_pcm_hw_params_any(handle, params); --- 424,427 ---- *************** *** 861,868 **** int err = 0; int devno; ! int chn,nchns; ! ! const snd_pcm_channel_area_t *mm_areas; ! #ifdef ALSAMM_DEBUG if(sys_verbose) --- 853,857 ---- int err = 0; int devno; ! int chn; #ifdef ALSAMM_DEBUG if(sys_verbose) *************** *** 1068,1073 **** t_sample *fpo, *fpi, *fp1, *fp2; int i, err, devno; - - const snd_pcm_channel_area_t *my_areas; snd_pcm_sframes_t size; snd_pcm_sframes_t commitres; --- 1057,1060 ---- *************** *** 1369,1374 **** int err; snd_pcm_status_t *status; - snd_output_t *output = NULL; - snd_pcm_status_alloca(&status); if ((err = snd_pcm_status(handle, status)) < 0) { --- 1356,1359 ----
Index: s_audio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio.c,v retrieving revision 1.5.4.16.2.2 retrieving revision 1.5.4.16.2.3 diff -C2 -d -r1.5.4.16.2.2 -r1.5.4.16.2.3 *** s_audio.c 16 Oct 2005 10:46:40 -0000 1.5.4.16.2.2 --- s_audio.c 27 Nov 2005 08:08:28 -0000 1.5.4.16.2.3 *************** *** 145,149 **** void sys_setchsr(int chin, int chout, int sr, int dacblocksize) { - int nblk; int inbytes; int outbytes; --- 145,148 ---- *************** *** 200,204 **** int *choutdev, int rate, int dacblocksize, int advance, int schedmode, int enable) { ! int i, *ip; int defaultchannels = SYS_DEFAULTCH; int inchans, outchans; --- 199,203 ---- int *choutdev, int rate, int dacblocksize, int advance, int schedmode, int enable) { ! int i; int defaultchannels = SYS_DEFAULTCH; int inchans, outchans; *************** *** 351,359 **** if (sys_audioapi == API_PORTAUDIO) { - int blksize = (sys_blocksize ? sys_blocksize : 64); pa_open_audio(inchans, outchans, rate, advance, ! (naudiooutdev > 0 ? audioindev[0] : 0), ! (naudiooutdev > 0 ? audiooutdev[0] : 0), ! schedmode); } else --- 350,356 ---- if (sys_audioapi == API_PORTAUDIO) { pa_open_audio(inchans, outchans, rate, advance, ! (naudiooutdev > 0 ? audioindev[0] : 0), ! (naudiooutdev > 0 ? audiooutdev[0] : 0), schedmode); } else *************** *** 783,790 **** void glob_audio_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) { ! int naudioindev, audioindev[MAXAUDIOINDEV], chindev[MAXAUDIOINDEV]; ! int naudiooutdev, audiooutdev[MAXAUDIOOUTDEV], choutdev[MAXAUDIOOUTDEV]; ! int rate, dacblocksize, advance, audioon, i, nindev, noutdev; ! int audioindev1, audioinchan1, audiooutdev1, audiooutchan1; int newaudioindev[4], newaudioinchan[4], newaudiooutdev[4], newaudiooutchan[4]; --- 780,784 ---- void glob_audio_dialog(t_pd *dummy, t_symbol *s, int argc, t_atom *argv) { ! int i, nindev, noutdev; int newaudioindev[4], newaudioinchan[4], newaudiooutdev[4], newaudiooutchan[4]; *************** *** 794,798 **** int newadvance = atom_getintarg(18, argc, argv); int newschedmode = atom_getintarg(19, argc, argv); - int statewas;
for (i = 0; i < 4; i++) --- 788,791 ---- *************** *** 810,815 **** newaudioindev[nindev] = newaudioindev[i]; newaudioinchan[nindev] = newaudioinchan[i]; - /* post("in %d %d %d", nindev, - newaudioindev[nindev] , newaudioinchan[nindev]); */ nindev++; } --- 803,806 ---- *************** *** 821,826 **** newaudiooutdev[noutdev] = newaudiooutdev[i]; newaudiooutchan[noutdev] = newaudiooutchan[i]; - /* post("out %d %d %d", noutdev, - newaudiooutdev[noutdev] , newaudioinchan[noutdev]); */ noutdev++; } --- 812,815 ----
Index: s_audio_pa.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_pa.c,v retrieving revision 1.4.4.7.2.2 retrieving revision 1.4.4.7.2.3 diff -C2 -d -r1.4.4.7.2.2 -r1.4.4.7.2.3 *** s_audio_pa.c 4 Oct 2005 16:42:33 -0000 1.4.4.7.2.2 --- s_audio_pa.c 27 Nov 2005 08:08:28 -0000 1.4.4.7.2.3 *************** *** 227,231 **** PaStreamCallbackFlags statusFlags, void *userData) { ! int i,j; int timeout = (float)frameCount / (float) sys_dacsr * 1e6;
--- 227,231 ---- PaStreamCallbackFlags statusFlags, void *userData) { ! int j; int timeout = (float)frameCount / (float) sys_dacsr * 1e6;
*************** *** 405,411 **** void pa_listdevs(void) /* lifted from pa_devs.c in portaudio */ { ! int i,j; int numDevices; - const PaDeviceInfo *pdi; PaError err; Pa_Initialize(); --- 405,410 ---- void pa_listdevs(void) /* lifted from pa_devs.c in portaudio */ { ! int i; int numDevices; PaError err; Pa_Initialize();