[PD-cvs] pd/src s_audio_pa.c, 1.4.4.7.2.5.2.5, 1.4.4.7.2.5.2.6 s_audio_portaudio.c, 1.1.2.21.2.8, 1.1.2.21.2.9

Mathieu Bouchard matju at users.sourceforge.net
Sat Aug 4 02:51:46 CEST 2007


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

Modified Files:
      Tag: desiredata
	s_audio_pa.c s_audio_portaudio.c 
Log Message:
remove stderr


Index: s_audio_portaudio.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/s_audio_portaudio.c,v
retrieving revision 1.1.2.21.2.8
retrieving revision 1.1.2.21.2.9
diff -C2 -d -r1.1.2.21.2.8 -r1.1.2.21.2.9
*** s_audio_portaudio.c	2 Aug 2007 22:25:14 -0000	1.1.2.21.2.8
--- s_audio_portaudio.c	4 Aug 2007 00:51:44 -0000	1.1.2.21.2.9
***************
*** 224,228 ****
  
  /* lifted from pa_devs.c in portaudio */
- /* this keeps the fprintf because it needs to be printed at cmdline */
  void pa_listdevs() {
      PaError err;
--- 224,227 ----
***************
*** 230,253 ****
      int numDevices = Pa_GetDeviceCount();
      if(numDevices < 0) {
!         fprintf(stderr, "ERROR: Pa_GetDeviceCount returned %d\n", numDevices);
          err = numDevices;
          goto error;
      }
!     fprintf(stderr, "Audio Devices:\n");
      for(int i=0; i<numDevices; i++) {
          const PaDeviceInfo *pdi = Pa_GetDeviceInfo(i);
          post ("device %s", pdi->name);
!         fprintf(stderr, "device %d:", i+1);
!         fprintf(stderr, " %s;", pdi->name);
!         fprintf(stderr, "%d inputs, ", pdi->maxInputChannels);
!         fprintf(stderr, "%d outputs", pdi->maxOutputChannels);
!         if (i == Pa_GetDefaultInputDevice())  fprintf(stderr, " (Default Input)");
!         if (i == Pa_GetDefaultOutputDevice()) fprintf(stderr, " (Default Output)");
!         fprintf(stderr, "\n");
      }
!     fprintf(stderr, "\n");
      return;
   error:
!     fprintf(stderr, "Error #%d occurred while using the portaudio stream: %s\n", err, Pa_GetErrorText(err));
  }
  
--- 229,252 ----
      int numDevices = Pa_GetDeviceCount();
      if(numDevices < 0) {
!         error("ERROR: Pa_GetDeviceCount returned %d", numDevices);
          err = numDevices;
          goto error;
      }
!     post("Audio Devices:");
      for(int i=0; i<numDevices; i++) {
          const PaDeviceInfo *pdi = Pa_GetDeviceInfo(i);
          post ("device %s", pdi->name);
!         post("device %d:", i+1);
!         post(" %s;", pdi->name);
!         post("%d inputs, ", pdi->maxInputChannels);
!         post("%d outputs ", pdi->maxOutputChannels);
!         if (i == Pa_GetDefaultInputDevice())  post(" (Default Input)");
!         if (i == Pa_GetDefaultOutputDevice()) post(" (Default Output)");
!         post("");
      }
!     post("");
      return;
   error:
!     error("Error #%d occurred while using the portaudio stream: %s\n", err, Pa_GetErrorText(err));
  }
  

Index: s_audio_pa.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/s_audio_pa.c,v
retrieving revision 1.4.4.7.2.5.2.5
retrieving revision 1.4.4.7.2.5.2.6
diff -C2 -d -r1.4.4.7.2.5.2.5 -r1.4.4.7.2.5.2.6
*** s_audio_pa.c	2 Aug 2007 22:25:13 -0000	1.4.4.7.2.5.2.5
--- s_audio_pa.c	4 Aug 2007 00:51:44 -0000	1.4.4.7.2.5.2.6
***************
*** 57,62 ****
      err = Pa_Initialize();
      if (err != paNoError) {
! 	fprintf(stderr, "Error number %d occured initializing portaudio", err);
! 	fprintf(stderr, "Error message: %s", Pa_GetErrorText(err));
  	return 1;
      }
--- 57,61 ----
      err = Pa_Initialize();
      if (err != paNoError) {
! 	error("Error number %d occured initializing portaudio: %s", err, Pa_GetErrorText(err));
  	return 1;
      }
***************
*** 271,309 ****
  
  void pa_listdevs() /* lifted from pa_devs.c in portaudio */ {
!     int     i,j;
!     int     numDevices;
!     const   PaDeviceInfo *pdi;
      PaError err;
      Pa_Initialize();
      numDevices = Pa_GetDeviceCount();
      if (numDevices<0) {
!         fprintf(stderr, "ERROR: Pa_GetDeviceCount returned %d\n", numDevices );
          err = numDevices;
          goto error;
      }
!     fprintf(stderr, "Audio Devices:\n");
!     for (i=0; i<numDevices; i++) {
  	const PaDeviceInfo *pdi = Pa_GetDeviceInfo(i);
          post("device %s", pdi->name);
! 	fprintf(stderr, "device %d:", i+1);
!         fprintf(stderr, " %s;", pdi->name);
!         fprintf(stderr, "%d inputs, ", pdi->maxInputChannels);
!         fprintf(stderr, "%d outputs", pdi->maxOutputChannels);
  #ifdef PA19
!         if (i == Pa_GetDefaultInputDevice ())   fprintf(stderr, " (Default Input)");
!         if (i == Pa_GetDefaultOutputDevice())   fprintf(stderr, " (Default Output)");
  #else
!         if (i == Pa_GetDefaultInputDeviceID ()) fprintf(stderr, " (Default Input)");
!         if (i == Pa_GetDefaultOutputDeviceID()) fprintf(stderr, " (Default Output)");
  #endif
!         fprintf(stderr, "\n");
      }
!     fprintf(stderr, "\n");
      return;
  error:
!     fprintf(stderr, "An error occured while using the portaudio stream\n");
!     fprintf(stderr, "Error number: %d\n",err);
!     fprintf(stderr, "Error message: %s\n",Pa_GetErrorText(err));
! 
  }
  /* scanning for devices */
--- 270,304 ----
  
  void pa_listdevs() /* lifted from pa_devs.c in portaudio */ {
!     int j, numDevices;
!     const PaDeviceInfo *pdi;
      PaError err;
      Pa_Initialize();
      numDevices = Pa_GetDeviceCount();
      if (numDevices<0) {
!         error("ERROR: Pa_GetDeviceCount returned %d", numDevices);
          err = numDevices;
          goto error;
      }
!     post("Audio Devices:");
!     for (int i=0; i<numDevices; i++) {
  	const PaDeviceInfo *pdi = Pa_GetDeviceInfo(i);
          post("device %s", pdi->name);
! 	post("device %d:", i+1);
!         post(" %s;", pdi->name);
!         post("%d inputs, ", pdi->maxInputChannels);
!         post("%d outputs", pdi->maxOutputChannels);
  #ifdef PA19
!         if (i == Pa_GetDefaultInputDevice ())   post(" (Default Input)");
!         if (i == Pa_GetDefaultOutputDevice())   post(" (Default Output)");
  #else
!         if (i == Pa_GetDefaultInputDeviceID ()) post(" (Default Input)");
!         if (i == Pa_GetDefaultOutputDeviceID()) post(" (Default Output)");
  #endif
!         post("");
      }
!     post("");
      return;
  error:
!     error("An error occured while using the portaudio stream: #%d: %s",err,Pa_GetErrorText(err));
  }
  /* scanning for devices */





More information about the Pd-cvs mailing list