Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15548
Modified Files: Tag: desiredata s_audio_alsa.c s_audio_alsamm.c s_audio_oss.c s_audio_mmio.c Log Message: remove blank lines in console
Index: s_audio_mmio.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_mmio.c,v retrieving revision 1.4.4.1.4.3 retrieving revision 1.4.4.1.4.4 diff -C2 -d -r1.4.4.1.4.3 -r1.4.4.1.4.4 *** s_audio_mmio.c 30 Jul 2007 23:26:40 -0000 1.4.4.1.4.3 --- s_audio_mmio.c 2 Aug 2007 22:27:42 -0000 1.4.4.1.4.4 *************** *** 131,142 **** if (sys_verbose) printf("opened adc device %d with return %d\n", nt_whichadc+nad,mmresult); if (mmresult != MMSYSERR_NOERROR) { ! nt_waveinerror("waveInOpen: %s\n", mmresult); nt_nwavein = nad; /* nt_nwavein = 0 wini */ } else { for (i = 0; i < nt_naudiobuffer; i++) { mmresult = waveInPrepareHeader(ntsnd_indev[nad], ntsnd_invec[nad][i].lpWaveHdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveinprepareheader: %s\n", mmresult); mmresult = waveInAddBuffer( ntsnd_indev[nad], ntsnd_invec[nad][i].lpWaveHdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveInAddBuffer: %s\n", mmresult); } } --- 131,142 ---- if (sys_verbose) printf("opened adc device %d with return %d\n", nt_whichadc+nad,mmresult); if (mmresult != MMSYSERR_NOERROR) { ! nt_waveinerror("waveInOpen: %s", mmresult); nt_nwavein = nad; /* nt_nwavein = 0 wini */ } else { for (i = 0; i < nt_naudiobuffer; i++) { mmresult = waveInPrepareHeader(ntsnd_indev[nad], ntsnd_invec[nad][i].lpWaveHdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveinprepareheader: %s", mmresult); mmresult = waveInAddBuffer( ntsnd_indev[nad], ntsnd_invec[nad][i].lpWaveHdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveInAddBuffer: %s", mmresult); } } *************** *** 150,154 **** if (mmresult != MMSYSERR_NOERROR) { post("Wave out open device %d + %d",nt_whichdac,nda); ! nt_waveouterror("waveOutOpen device: %s\n", mmresult); nt_nwaveout = nda; } --- 150,154 ---- if (mmresult != MMSYSERR_NOERROR) { post("Wave out open device %d + %d",nt_whichdac,nda); ! nt_waveouterror("waveOutOpen device: %s", mmresult); nt_nwaveout = nda; } *************** *** 163,176 **** for (nda=0; nda < nt_nwaveout; nda++) /*if (nt_nwaveout) wini */ { errcode = waveOutReset(ntsnd_outdev[nda]); ! if (errcode != MMSYSERR_NOERROR) printf("error resetting output %d: %d\n", nda, errcode); errcode = waveOutClose(ntsnd_outdev[nda]); ! if (errcode != MMSYSERR_NOERROR) printf("error closing output %d: %d\n",nda , errcode); } nt_nwaveout = 0; for(nad=0; nad < nt_nwavein;nad++) /* if (nt_nwavein) wini */ { errcode = waveInReset(ntsnd_indev[nad]); ! if (errcode != MMSYSERR_NOERROR) printf("error resetting input: %d\n", errcode); errcode = waveInClose(ntsnd_indev[nad]); ! if (errcode != MMSYSERR_NOERROR) printf("error closing input: %d\n", errcode); } nt_nwavein = 0; --- 163,176 ---- for (nda=0; nda < nt_nwaveout; nda++) /*if (nt_nwaveout) wini */ { errcode = waveOutReset(ntsnd_outdev[nda]); ! if (errcode != MMSYSERR_NOERROR) printf("error resetting output %d: %d", nda, errcode); errcode = waveOutClose(ntsnd_outdev[nda]); ! if (errcode != MMSYSERR_NOERROR) printf("error closing output %d: %d",nda , errcode); } nt_nwaveout = 0; for(nad=0; nad < nt_nwavein;nad++) /* if (nt_nwavein) wini */ { errcode = waveInReset(ntsnd_indev[nad]); ! if (errcode != MMSYSERR_NOERROR) printf("error resetting input: %d", errcode); errcode = waveInClose(ntsnd_indev[nad]); ! if (errcode != MMSYSERR_NOERROR) printf("error closing input: %d", errcode); } nt_nwavein = 0; *************** *** 314,318 **** waveInPrepareHeader(ntsnd_indev[nad], inwavehdr, sizeof(WAVEHDR)); mmresult = waveInAddBuffer(ntsnd_indev[nad], inwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveInAddBuffer: %s\n", mmresult); ntsnd_inphase[nad] = phase = WRAPFWD(phase + 1); } --- 314,318 ---- waveInPrepareHeader(ntsnd_indev[nad], inwavehdr, sizeof(WAVEHDR)); mmresult = waveInAddBuffer(ntsnd_indev[nad], inwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveInAddBuffer: %s", mmresult); ntsnd_inphase[nad] = phase = WRAPFWD(phase + 1); } *************** *** 330,334 **** waveOutPrepareHeader( ntsnd_outdev[nda], outwavehdr, sizeof(WAVEHDR)); mmresult = waveOutWrite(ntsnd_outdev[nda], outwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveouterror("waveOutAddBuffer: %s\n", mmresult); ntsnd_outphase[nda] = phase = WRAPFWD(phase + 1); } --- 330,334 ---- waveOutPrepareHeader( ntsnd_outdev[nda], outwavehdr, sizeof(WAVEHDR)); mmresult = waveOutWrite(ntsnd_outdev[nda], outwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveouterror("waveOutAddBuffer: %s", mmresult); ntsnd_outphase[nda] = phase = WRAPFWD(phase + 1); } *************** *** 448,452 **** waveInPrepareHeader(device, inwavehdr, sizeof(WAVEHDR)); mmresult = waveInAddBuffer(device, inwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveInAddBuffer: %s\n", mmresult); ntsnd_inphase[nad] = WRAPFWD(phase + 1); } --- 448,452 ---- waveInPrepareHeader(device, inwavehdr, sizeof(WAVEHDR)); mmresult = waveInAddBuffer(device, inwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveinerror("waveInAddBuffer: %s", mmresult); ntsnd_inphase[nad] = WRAPFWD(phase + 1); } *************** *** 457,461 **** waveOutPrepareHeader(device, outwavehdr, sizeof(WAVEHDR)); mmresult = waveOutWrite(device, outwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveouterror("waveOutWrite: %s\n", mmresult); ntsnd_outphase[nda] = WRAPFWD(phase + 1); } --- 457,461 ---- waveOutPrepareHeader(device, outwavehdr, sizeof(WAVEHDR)); mmresult = waveOutWrite(device, outwavehdr, sizeof(WAVEHDR)); ! if (mmresult != MMSYSERR_NOERROR) nt_waveouterror("waveOutWrite: %s", mmresult); ntsnd_outphase[nda] = WRAPFWD(phase + 1); } *************** *** 530,534 **** WAVEINCAPS wicap; wRtn = waveInGetDevCaps(i, (LPWAVEINCAPS) &wicap, sizeof(wicap)); ! if (wRtn) nt_waveinerror("waveInGetDevCaps: %s\n", wRtn); else post("audio input device #%d: %s", i+1, wicap.szPname); } --- 530,534 ---- WAVEINCAPS wicap; wRtn = waveInGetDevCaps(i, (LPWAVEINCAPS) &wicap, sizeof(wicap)); ! if (wRtn) nt_waveinerror("waveInGetDevCaps: %s", wRtn); else post("audio input device #%d: %s", i+1, wicap.szPname); } *************** *** 537,541 **** WAVEOUTCAPS wocap; wRtn = waveOutGetDevCaps(i, (LPWAVEOUTCAPS) &wocap, sizeof(wocap)); ! if (wRtn) nt_waveouterror("waveOutGetDevCaps: %s\n", wRtn); else post("audio output device #%d: %s", i+1, wocap.szPname); } --- 537,541 ---- WAVEOUTCAPS wocap; wRtn = waveOutGetDevCaps(i, (LPWAVEOUTCAPS) &wocap, sizeof(wocap)); ! if (wRtn) nt_waveouterror("waveOutGetDevCaps: %s", wRtn); else post("audio output device #%d: %s", i+1, wocap.szPname); }
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.11 retrieving revision 1.5.4.5.2.2.2.12 diff -C2 -d -r1.5.4.5.2.2.2.11 -r1.5.4.5.2.2.2.12 *** s_audio_alsa.c 30 Jul 2007 23:48:34 -0000 1.5.4.5.2.2.2.11 --- s_audio_alsa.c 2 Aug 2007 22:27:42 -0000 1.5.4.5.2.2.2.12 *************** *** 249,253 **** } else if (inchans) { for (iodev = 0; iodev < alsa_nindev; iodev++) ! if ((err = snd_pcm_start(alsa_indev[iodev].a_handle)) < 0) check_error(err, "input start failed\n"); } return 0; --- 249,253 ---- } else if (inchans) { for (iodev = 0; iodev < alsa_nindev; iodev++) ! if ((err = snd_pcm_start(alsa_indev[iodev].a_handle)) < 0) check_error(err, "input start failed"); } return 0; *************** *** 333,337 **** if (result != (int)transfersize) { #ifdef DEBUG_ALSA_XFER ! if (result >= 0 || errno == EAGAIN) post("ALSA: write returned %d of %d\n", result, transfersize); else error("ALSA: write: %s", snd_strerror(errno)); post("inputcount %d, outputcount %d, outbufsize %d", --- 333,337 ---- if (result != (int)transfersize) { #ifdef DEBUG_ALSA_XFER ! if (result >= 0 || errno == EAGAIN) post("ALSA: write returned %d of %d", result, transfersize); else error("ALSA: write: %s", snd_strerror(errno)); post("inputcount %d, outputcount %d, outbufsize %d", *************** *** 408,412 **** if (result<0) error("snd_pcm_delay 2 failed"); else post("out delay %d", outdelay); } ! post("sum %d (%d mod 64)\n", indelay + outdelay, (indelay+outdelay)%64); post("buf samples %d", alsa_buf_samps); } --- 408,412 ---- if (result<0) error("snd_pcm_delay 2 failed"); else post("out delay %d", outdelay); } ! post("sum %d (%d mod 64)", indelay + outdelay, (indelay+outdelay)%64); post("buf samples %d", alsa_buf_samps); }
Index: s_audio_oss.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_oss.c,v retrieving revision 1.6.4.2.2.2.2.8 retrieving revision 1.6.4.2.2.2.2.9 diff -C2 -d -r1.6.4.2.2.2.2.8 -r1.6.4.2.2.2.2.9 *** s_audio_oss.c 30 Jul 2007 22:55:24 -0000 1.6.4.2.2.2.2.8 --- s_audio_oss.c 2 Aug 2007 22:27:42 -0000 1.6.4.2.2.2.2.9 *************** *** 159,163 **** param = orig = (nfragment<<16) + logfragsize; if (ioctl(fd,SNDCTL_DSP_SETFRAGMENT, ¶m) == -1) ! error("OSS: Could not set or read fragment size\n"); if (param != orig) { nfragment = ((param >> 16) & 0xffff); --- 159,163 ---- param = orig = (nfragment<<16) + logfragsize; if (ioctl(fd,SNDCTL_DSP_SETFRAGMENT, ¶m) == -1) ! error("OSS: Could not set or read fragment size"); if (param != orig) { nfragment = ((param >> 16) & 0xffff);
Index: s_audio_alsamm.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_audio_alsamm.c,v retrieving revision 1.1.4.5.2.2.2.3 retrieving revision 1.1.4.5.2.2.2.4 diff -C2 -d -r1.1.4.5.2.2.2.3 -r1.1.4.5.2.2.2.4 *** s_audio_alsamm.c 10 Jul 2007 04:45:58 -0000 1.1.4.5.2.2.2.3 --- s_audio_alsamm.c 2 Aug 2007 22:27:42 -0000 1.1.4.5.2.2.2.4 *************** *** 132,136 **** snd_output_t* alsa_stdout;
! static void check_error(int err, const char *why) {if (err < 0) error("%s: %s\n", why, snd_strerror(err));}
int alsamm_open_audio(int rate) { --- 132,136 ---- snd_output_t* alsa_stdout;
! static void check_error(int err, const char *why) {if (err < 0) error("%s: %s", why, snd_strerror(err));}
int alsamm_open_audio(int rate) { *************** *** 212,216 **** } memset(alsa_indev[i].a_addr, 0, sizeof(char*) * alsa_indev[i].a_channels); ! if(sys_verbose) post("capture device with %d channels and buffertime %d us opened\n", alsa_indev[i].a_channels,alsamm_buffertime); } /* check for linked handles of input for each output*/ --- 212,216 ---- } memset(alsa_indev[i].a_addr, 0, sizeof(char*) * alsa_indev[i].a_channels); ! if(sys_verbose) post("capture device with %d channels and buffertime %d us opened", alsa_indev[i].a_channels,alsamm_buffertime); } /* check for linked handles of input for each output*/