[PD-cvs] pd/src s_audio_pablio.c,1.1.4.2.2.4.2.1,1.1.4.2.2.4.2.2

Mathieu Bouchard matju at users.sourceforge.net
Tue Jul 31 00:19:13 CEST 2007


Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2328

Modified Files:
      Tag: desiredata
	s_audio_pablio.c 
Log Message:
remove fprintf


Index: s_audio_pablio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_pablio.c,v
retrieving revision 1.1.4.2.2.4.2.1
retrieving revision 1.1.4.2.2.4.2.2
diff -C2 -d -r1.1.4.2.2.4.2.1 -r1.1.4.2.2.4.2.2
*** s_audio_pablio.c	30 Jul 2007 22:16:27 -0000	1.1.4.2.2.4.2.1
--- s_audio_pablio.c	30 Jul 2007 22:19:11 -0000	1.1.4.2.2.4.2.2
***************
*** 188,195 ****
      PaStreamParameters instreamparams, outstreamparams;  /* MSP */
  #endif
!     /* fprintf(stderr,
!         "open %lf fmt %d flags %d ch: %d fperbuf: %d nbuf: %d devs: %d %d\n",
!            sampleRate, format, flags, nchannels,
!            framesperbuf, nbuffers, indeviceno, outdeviceno); */
      if (indeviceno < 0) {
  #ifdef PA19
--- 188,193 ----
      PaStreamParameters instreamparams, outstreamparams;  /* MSP */
  #endif
!     /* post("open %lf fmt %d flags %d ch: %d fperbuf: %d nbuf: %d devs: %d %d",
!            sampleRate, format, flags, nchannels, framesperbuf, nbuffers, indeviceno, outdeviceno); */
      if (indeviceno < 0) {
  #ifdef PA19
***************
*** 199,203 ****
  #endif
          if (indeviceno == paNoDevice) inchannels = 0;
! 	fprintf(stderr, "using default input device number: %d\n", indeviceno);
      }
      if (outdeviceno<0) {
--- 197,201 ----
  #endif
          if (indeviceno == paNoDevice) inchannels = 0;
! 	post("using default input device number: %d", indeviceno);
      }
      if (outdeviceno<0) {
***************
*** 208,214 ****
  #endif
  	if(outdeviceno == paNoDevice) outchannels = 0;
! 	fprintf(stderr, "using default output device number: %d\n", outdeviceno);
      }
!     /* fprintf(stderr, "nchan %d, flags %d, bufs %d, framesperbuf %d\n", nchannels, flags, nbuffers, framesperbuf); */
      /* Allocate PABLIO_Stream structure for caller. */
      aStream = (PABLIO_Stream *) malloc(sizeof(PABLIO_Stream));
--- 206,212 ----
  #endif
  	if(outdeviceno == paNoDevice) outchannels = 0;
! 	post("using default output device number: %d", outdeviceno);
      }
!     /* post("nchan %d, flags %d, bufs %d, framesperbuf %d", nchannels, flags, nbuffers, framesperbuf); */
      /* Allocate PABLIO_Stream structure for caller. */
      aStream = (PABLIO_Stream *) malloc(sizeof(PABLIO_Stream));
***************
*** 218,228 ****
      bytesPerSample = Pa_GetSampleSize(format);
      if (bytesPerSample<0) {err = (PaError) bytesPerSample; goto error;}
!     aStream->insamplesPerFrame = inchannels;  /* MSP */
!     aStream->inbytesPerFrame = bytesPerSample * aStream->insamplesPerFrame;
!     aStream->outsamplesPerFrame = outchannels;
!     aStream->outbytesPerFrame = bytesPerSample * aStream->outsamplesPerFrame;
!     /* Initialize PortAudio  */
      err = Pa_Initialize();
!     if( err != paNoError ) goto error;
  #ifdef PA19
      numFrames = nbuffers * framesperbuf; /* ...MSP */
--- 216,223 ----
      bytesPerSample = Pa_GetSampleSize(format);
      if (bytesPerSample<0) {err = (PaError) bytesPerSample; goto error;}
!     aStream-> insamplesPerFrame =  inchannels; aStream-> inbytesPerFrame = bytesPerSample * aStream-> insamplesPerFrame;
!     aStream->outsamplesPerFrame = outchannels; aStream->outbytesPerFrame = bytesPerSample * aStream->outsamplesPerFrame;
      err = Pa_Initialize();
!     if (err != paNoError) goto error;
  #ifdef PA19
      numFrames = nbuffers * framesperbuf; /* ...MSP */
***************
*** 242,251 ****
      minNumBuffers = Pa_GetMinNumBuffers(framesperbuf, sampleRate);
      if (minNumBuffers > nbuffers)
!         fprintf(stderr,
!         "warning: number of buffers %d less than recommended minimum %d\n",
!             (int)nbuffers, (int)minNumBuffers);
  #endif
      numFrames = nbuffers * framesperbuf;
!     /* fprintf(stderr, "numFrames %d\n", numFrames); */
      /* Initialize Ring Buffers */
      doRead = (inchannels != 0);
--- 237,244 ----
      minNumBuffers = Pa_GetMinNumBuffers(framesperbuf, sampleRate);
      if (minNumBuffers > nbuffers)
!         post("warning: number of buffers %d less than recommended minimum %d", (int)nbuffers, (int)minNumBuffers);
  #endif
      numFrames = nbuffers * framesperbuf;
!     /* post("numFrames %d", numFrames); */
      /* Initialize Ring Buffers */
      doRead = (inchannels != 0);
***************
*** 277,281 ****
      err = Pa_StartStream( aStream->stream );
      if (err != paNoError) {
!         fprintf(stderr, "Pa_StartStream failed; closing audio stream...\n");
          PD_CloseAudioStream(aStream);
          goto error;
--- 270,274 ----
      err = Pa_StartStream( aStream->stream );
      if (err != paNoError) {
!         error("Pa_StartStream failed; closing audio stream...");
          PD_CloseAudioStream(aStream);
          goto error;





More information about the Pd-cvs mailing list