Browse Source

[0.99.3] fix portaudio -P option

git-svn-id: svn+ssh://jackaudio.org/trunk/jack@766 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/0.109.0
joq 21 years ago
parent
commit
08ac9a0305
2 changed files with 15 additions and 8 deletions
  1. +1
    -1
      configure.in
  2. +14
    -7
      drivers/portaudio/portaudio_driver.c

+ 1
- 1
configure.in View File

@@ -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


+ 14
- 7
drivers/portaudio/portaudio_driver.c View File

@@ -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; j<pdi->numSampleRates; j++){


Loading…
Cancel
Save