|
|
|
@@ -50,7 +50,7 @@ namespace Jack |
|
|
|
int out_max = 0; |
|
|
|
|
|
|
|
fInputDevice = Pa_GetDefaultInputDevice(); |
|
|
|
fOutputDevice = Pa_GetDefaultOutputDevice();
|
|
|
|
fOutputDevice = Pa_GetDefaultOutputDevice(); |
|
|
|
|
|
|
|
for (node = params; node; node = jack_slist_next(node)) |
|
|
|
{ |
|
|
|
@@ -117,22 +117,19 @@ namespace Jack |
|
|
|
|
|
|
|
//set adapter interface channels |
|
|
|
SetInputs ( fCaptureChannels ); |
|
|
|
SetOutputs ( fPlaybackChannels );
|
|
|
|
SetOutputs ( fPlaybackChannels ); |
|
|
|
} |
|
|
|
|
|
|
|
int JackPortAudioAdapter::Open() |
|
|
|
{ |
|
|
|
PaError err; |
|
|
|
PaStreamParameters inputParameters; |
|
|
|
PaStreamParameters outputParameters;
|
|
|
|
|
|
|
|
if (fInputDevice == paNoDevice && fOutputDevice == paNoDevice) {
|
|
|
|
jack_error("No input and output device!!");
|
|
|
|
return -1;
|
|
|
|
} |
|
|
|
PaStreamParameters outputParameters; |
|
|
|
|
|
|
|
if ( JackAudioAdapterInterface::Open() < 0 ) |
|
|
|
if (fInputDevice == paNoDevice && fOutputDevice == paNoDevice) { |
|
|
|
jack_error("No input and output device!!"); |
|
|
|
return -1; |
|
|
|
} |
|
|
|
|
|
|
|
jack_log("JackPortAudioAdapter::Open fInputDevice = %d DeviceName %s", fInputDevice, fPaDevices.GetFullName(fInputDevice).c_str()); |
|
|
|
jack_log("JackPortAudioAdapter::Open fOutputDevice = %d DeviceName %s", fOutputDevice, fPaDevices.GetFullName(fOutputDevice).c_str()); |
|
|
|
@@ -191,7 +188,7 @@ namespace Jack |
|
|
|
jack_log ( "JackPortAudioAdapter:: Pa_StopStream" ); |
|
|
|
Pa_CloseStream ( fStream ); |
|
|
|
jack_log ( "JackPortAudioAdapter:: Pa_CloseStream" ); |
|
|
|
return JackAudioAdapterInterface::Close(); |
|
|
|
return 0; |
|
|
|
} |
|
|
|
|
|
|
|
int JackPortAudioAdapter::SetSampleRate ( jack_nframes_t sample_rate ) |
|
|
|
@@ -314,3 +311,4 @@ extern "C" |
|
|
|
#ifdef __cplusplus |
|
|
|
} |
|
|
|
#endif |
|
|
|
|