[Summary] Fixed windows error with retrieving available sample rates from the device:

error code was not returned when eNoError value should be.
This commit is contained in:
Greg Zharun 2014-07-08 13:00:32 +03:00
parent 4da2222a8e
commit cfe2b3c17c

View file

@ -1665,7 +1665,16 @@ WTErr WCMRPortAudioDeviceManager::getDeviceSampleRatesImpl(const std::string & d
DeviceInfo devInfo;
retVal = GetDeviceInfoByName(deviceName, devInfo);
sampleRates.assign(devInfo.m_AvailableSampleRates.begin(), devInfo.m_AvailableSampleRates.end() );
if (eNoErr == retVal)
{
sampleRates.assign(devInfo.m_AvailableSampleRates.begin(), devInfo.m_AvailableSampleRates.end() );
}
else
{
std::cout << "API::PortAudioDeviceManager::GetSampleRates: Device not found: "<< deviceName << std::endl;
}
return retVal;
}