diff --git a/windows/portaudio/JackPortAudioDevices.cpp b/windows/portaudio/JackPortAudioDevices.cpp index 4ef94c36..2987fda8 100644 --- a/windows/portaudio/JackPortAudioDevices.cpp +++ b/windows/portaudio/JackPortAudioDevices.cpp @@ -314,12 +314,3 @@ bool PortAudioDevices::IsDuplex(PaDeviceIndex id) //then the device isn't full duplex return false; } - -bool PortAudioDevices::IsASIO(PaDeviceIndex id) -{ - #ifdef WIN32 - return (Pa_GetHostApiInfo(fDeviceInfo[id]->hostApi)->type == paASIO); - #else - return false; - #endif -} \ No newline at end of file diff --git a/windows/portaudio/JackPortAudioDevices.h b/windows/portaudio/JackPortAudioDevices.h index 89258673..0acb104b 100644 --- a/windows/portaudio/JackPortAudioDevices.h +++ b/windows/portaudio/JackPortAudioDevices.h @@ -58,7 +58,6 @@ class PortAudioDevices int GetPreferredBufferSize(PaDeviceIndex id); void DisplayDevicesNames(); bool IsDuplex(PaDeviceIndex id); - bool IsASIO(PaDeviceIndex id); }; diff --git a/windows/portaudio/JackPortAudioDriver.cpp b/windows/portaudio/JackPortAudioDriver.cpp index 4fffd6ce..276a5609 100644 --- a/windows/portaudio/JackPortAudioDriver.cpp +++ b/windows/portaudio/JackPortAudioDriver.cpp @@ -98,7 +98,7 @@ PaError JackPortAudioDriver::OpenStream(jack_nframes_t buffer_size) inputParameters.channelCount = fCaptureChannels; inputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output inputParameters.suggestedLatency = (fInputDevice != paNoDevice) // TODO: check how to setup this on ASIO - ? (fPaDevices->IsASIO(fInputDevice) ? 0 : Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency) + ? ((fPaDevices->GetHostFromDevice(fInputDevice) == "ASIO") ? 0 : Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency) : 0; inputParameters.hostApiSpecificStreamInfo = NULL; @@ -106,7 +106,7 @@ PaError JackPortAudioDriver::OpenStream(jack_nframes_t buffer_size) outputParameters.channelCount = fPlaybackChannels; outputParameters.sampleFormat = paFloat32 | paNonInterleaved; // 32 bit floating point output outputParameters.suggestedLatency = (fOutputDevice != paNoDevice) // TODO: check how to setup this on ASIO - ? (fPaDevices->IsASIO(fOutputDevice) ? 0 : Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency) + ? ((fPaDevices->GetHostFromDevice(fOutputDevice) == "ASIO") ? 0 : Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency) : 0; outputParameters.hostApiSpecificStreamInfo = NULL; @@ -263,8 +263,7 @@ int JackPortAudioDriver::Attach() if (fInputDevice != paNoDevice && fPaDevices->GetHostFromDevice(fInputDevice) == "ASIO") { for (int i = 0; i < fCaptureChannels; i++) { - PaError err = PaAsio_GetInputChannelName(fInputDevice, i, &alias); - if (err == paNoError) { + if (PaAsio_GetInputChannelName(fInputDevice, i, &alias) == paNoError) { JackPort* port = fGraphManager->GetPort(fCapturePortList[i]); port->SetAlias(alias); } @@ -273,8 +272,7 @@ int JackPortAudioDriver::Attach() if (fOutputDevice != paNoDevice && fPaDevices->GetHostFromDevice(fOutputDevice) == "ASIO") { for (int i = 0; i < fPlaybackChannels; i++) { - PaError err = PaAsio_GetInputChannelName(fOutputDevice, i, &alias); - if (err == paNoError) { + if (PaAsio_GetOutputChannelName(fOutputDevice, i, &alias) == paNoError) { JackPort* port = fGraphManager->GetPort(fPlaybackPortList[i]); port->SetAlias(alias); }