1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

XTRX: effectively allow auto hardware decimation/interpolation

This commit is contained in:
f4exb 2020-04-14 22:32:21 +02:00
parent 4300ae6623
commit 8653d326b3

View File

@ -117,21 +117,12 @@ void DeviceXTRX::getAutoGains(uint32_t autoGain, uint32_t& lnaGain, uint32_t& ti
double DeviceXTRX::set_samplerate(double rate, double master, bool output)
{
if (output)
{
m_masterRate = master;
if (output) {
m_outputRate = rate;
if (master != 0.0) {
m_masterRate = master;
}
}
else
{
} else {
m_inputRate = rate;
if (master != 0.0) {
m_masterRate = master;
}
}
int res = xtrx_set_samplerate(m_dev,
@ -145,7 +136,7 @@ double DeviceXTRX::set_samplerate(double rate, double master, bool output)
if (res)
{
qCritical("DeviceXTRX::set_samplerate: Unable to set %s samplerate, m_masterRate: %f, m_inputRate: %f, m_outputRate: %f, error=%d\n",
qCritical("DeviceXTRX::set_samplerate: Unable to set %s samplerate, m_masterRate: %f, m_inputRate: %f, m_outputRate: %f, error=%d",
output ? "output" : "input", m_masterRate, m_inputRate, m_outputRate, res);
return 0;
}