|
|
|
@@ -284,8 +284,8 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes, |
|
|
|
if (capturing) { |
|
|
|
if (!GetInputDeviceFromName(capture_driver_uid, &fInputDevice, &in_max)) { |
|
|
|
JackLog("JackPortAudioDriver::GetInputDeviceFromName cannot open %s\n", capture_driver_uid); |
|
|
|
fInputDevice = Pa_GetDefaultInputDevice();
|
|
|
|
if (fInputDevice == paNoDevice)
|
|
|
|
fInputDevice = Pa_GetDefaultInputDevice(); |
|
|
|
if (fInputDevice == paNoDevice) |
|
|
|
goto error; |
|
|
|
deviceInfo = Pa_GetDeviceInfo(fInputDevice); |
|
|
|
in_max = deviceInfo->maxInputChannels; |
|
|
|
@@ -301,8 +301,8 @@ int JackPortAudioDriver::Open(jack_nframes_t nframes, |
|
|
|
if (playing) { |
|
|
|
if (!GetOutputDeviceFromName(playback_driver_uid, &fOutputDevice, &out_max)) { |
|
|
|
JackLog("JackPortAudioDriver::GetOutputDeviceFromName cannot open %s\n", playback_driver_uid); |
|
|
|
fOutputDevice = Pa_GetDefaultOutputDevice();
|
|
|
|
if (fOutputDevice == paNoDevice)
|
|
|
|
fOutputDevice = Pa_GetDefaultOutputDevice(); |
|
|
|
if (fOutputDevice == paNoDevice) |
|
|
|
goto error; |
|
|
|
deviceInfo = Pa_GetDeviceInfo(fOutputDevice); |
|
|
|
out_max = deviceInfo->maxOutputChannels; |
|
|
|
@@ -440,10 +440,7 @@ int JackPortAudioDriver::SetBufferSize(jack_nframes_t buffer_size) |
|
|
|
jack_error("Pa_OpenStream error = %s\n", Pa_GetErrorText(err)); |
|
|
|
return -1; |
|
|
|
} else { |
|
|
|
// Only done when success |
|
|
|
fEngineControl->fBufferSize = buffer_size; |
|
|
|
fEngineControl->fPeriodUsecs = jack_time_t(1000000.f / fEngineControl->fSampleRate * fEngineControl->fBufferSize); // In microsec |
|
|
|
return 0; |
|
|
|
return JackAudioDriver::SetBufferSize(buffer_size); // never fails; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|