Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15255
Modified Files: Tag: desiredata s_audio_portaudio.c Log Message: removed fprintf
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.6 retrieving revision 1.1.2.21.2.7 diff -C2 -d -r1.1.2.21.2.6 -r1.1.2.21.2.7 *** s_audio_portaudio.c 10 Jul 2007 16:52:22 -0000 1.1.2.21.2.6 --- s_audio_portaudio.c 30 Jul 2007 22:54:00 -0000 1.1.2.21.2.7 *************** *** 18,24 **** #include <portaudio.h> #include <errno.h> - #include "assert.h" - #ifdef MSW # include <malloc.h> --- 18,22 ---- *************** *** 27,33 **** # include <alloca.h> #endif - #include "pthread.h" - /* for M_PI */ #if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES) --- 25,29 ---- *************** *** 35,40 **** #endif #include <math.h> - - #define MAX_PA_CHANS 32
--- 31,34 ---- *************** *** 51,56 **** pa_status = Pa_Initialize(); if (pa_status!=paNoError) { ! fprintf(stderr, "Error number %d occured initializing portaudio\n", pa_status); ! fprintf(stderr, "Error message: %s\n", Pa_GetErrorText(pa_status)); return; } --- 45,49 ---- pa_status = Pa_Initialize(); if (pa_status!=paNoError) { ! error("Error number %d occured initializing portaudio: %s\n", pa_status, Pa_GetErrorText(pa_status)); return; } *************** *** 76,87 **** sys_setscheduler(schedmode); /* post("in %d out %d rate %d device %d", inchans, outchans, rate, deviceno); */ ! if (inchans > MAX_PA_CHANS) { ! post("input channels reduced to maximum %d", MAX_PA_CHANS); ! inchans = MAX_PA_CHANS; ! } ! if (outchans > MAX_PA_CHANS) { ! post("output channels reduced to maximum %d", MAX_PA_CHANS); ! outchans = MAX_PA_CHANS; ! } pdi = NULL; if (inchans > 0) { --- 69,74 ---- sys_setscheduler(schedmode); /* post("in %d out %d rate %d device %d", inchans, outchans, rate, deviceno); */ ! if ( inchans > MAX_PA_CHANS) {post( "input channels reduced to maximum %d", MAX_PA_CHANS); inchans = MAX_PA_CHANS;} ! if (outchans > MAX_PA_CHANS) {post("output channels reduced to maximum %d", MAX_PA_CHANS); outchans = MAX_PA_CHANS;} pdi = NULL; if (inchans > 0) { *************** *** 240,243 **** --- 227,231 ----
/* lifted from pa_devs.c in portaudio */ + /* this keeps the fprintf because it needs to be printed at cmdline */ void pa_listdevs() { PaError err; *************** *** 264,270 **** 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)); }
--- 252,256 ---- return; error: ! fprintf(stderr, "Error #%d occurred while using the portaudio stream: %s\n", err, Pa_GetErrorText(err)); }