From 08ac9a0305c6b749ac4e5dbd151d7111966fd3f9 Mon Sep 17 00:00:00 2001 From: joq Date: Fri, 8 Oct 2004 03:00:13 +0000 Subject: [PATCH] [0.99.3] fix portaudio -P option git-svn-id: svn+ssh://jackaudio.org/trunk/jack@766 0c269be4-1314-0410-8aa9-9f06e86f4224 --- configure.in | 2 +- drivers/portaudio/portaudio_driver.c | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/configure.in b/configure.in index 0bcfff2..13eb48c 100644 --- a/configure.in +++ b/configure.in @@ -15,7 +15,7 @@ dnl changes are made dnl --- JACK_MAJOR_VERSION=0 JACK_MINOR_VERSION=99 -JACK_MICRO_VERSION=2 +JACK_MICRO_VERSION=3 dnl --- dnl HOWTO: updating the jack protocol version diff --git a/drivers/portaudio/portaudio_driver.c b/drivers/portaudio/portaudio_driver.c index f21f2d7..367d011 100644 --- a/drivers/portaudio/portaudio_driver.c +++ b/drivers/portaudio/portaudio_driver.c @@ -394,21 +394,27 @@ static int portaudio_load_driver (portaudio_driver_t *driver, printf("---------------------------------------------- #%d\n", i); //if (strcmp(driver_name,pdi->name) == 0) { - if (strncmp(driver_name,pdi->name,JACK_DRIVER_PARAM_STRING_MAX) == 0) { // compare the JACK_DRIVER_PARAM_STRING_MAX first character + // compare the first character + if (strncmp (driver_name, pdi->name, + JACK_DRIVER_PARAM_STRING_MAX) == 0) { if (pdi->maxInputChannels > 0) { *inputDeviceID = i; - driver->capture_nchannels = (capturing) ? pdi->maxInputChannels : 0; + driver->capture_nchannels = + (capturing) ? pdi->maxInputChannels : 0; strcpy(driver->driver_name,pdi->name); printf("Found input driver = %s\n", driver_name); found = 1; - }else if (pdi->maxOutputChannels > 0) { + } + if (pdi->maxOutputChannels > 0) { *outputDeviceID = i; - driver->playback_nchannels = (playing) ? pdi->maxOutputChannels : 0; + driver->playback_nchannels = + (playing) ? pdi->maxOutputChannels : 0; strcpy (driver->driver_name,pdi->name); printf("Found output driver = %s\n", driver_name); found = 1; - }else { - printf("Found driver without input or ouput = %s\n", driver_name); + } else { + printf("Found driver without input or ouput = %s\n", + driver_name); } } @@ -416,7 +422,8 @@ static int portaudio_load_driver (portaudio_driver_t *driver, printf("Max Inputs = %d ", pdi->maxInputChannels); printf("Max Outputs = %d\n", pdi->maxOutputChannels); if( pdi->numSampleRates == -1 ){ - printf("Sample Rate Range = %f to %f\n", pdi->sampleRates[0], pdi->sampleRates[1]); + printf("Sample Rate Range = %f to %f\n", pdi->sampleRates[0], + pdi->sampleRates[1]); }else{ printf("Sample Rates ="); for(j=0; jnumSampleRates; j++){