1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 16:08:39 -05:00

AirspyHF support: specify int16 samples

This commit is contained in:
f4exb 2018-01-11 04:40:13 +01:00
parent 7173f1b248
commit 89b67b0378
2 changed files with 18 additions and 3 deletions

View File

@ -134,6 +134,8 @@ bool AirspyHFInput::openDevice()
delete[] sampleRates;
airspyhf_set_sampleformat(m_dev, AIRSPYHF_SAMPLE_FORMAT_INT16);
return true;
}
@ -387,6 +389,7 @@ bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force)
|| (m_settings.m_transverterMode != settings.m_transverterMode)
|| (m_settings.m_transverterDeltaFrequency != settings.m_transverterDeltaFrequency))
{
m_settings.m_LOppmTenths = settings.m_LOppmTenths;
qint64 deviceCenterFrequency = settings.m_centerFrequency;
deviceCenterFrequency -= settings.m_transverterMode ? settings.m_transverterDeltaFrequency : 0;
deviceCenterFrequency = deviceCenterFrequency < 0 ? 0 : deviceCenterFrequency;

View File

@ -254,22 +254,34 @@ void DeviceSourceAPI::loadSourceSettings(const Preset* preset)
if (m_sampleSourcePluginInstanceUI != 0) // GUI flavor
{
m_sampleSourcePluginInstanceUI->deserialize(*sourceConfig);
m_sampleSourcePluginInstanceUI->setCenterFrequency(centerFrequency);
}
else if (m_deviceSourceEngine->getSource() != 0) // Server flavor
{
m_deviceSourceEngine->getSource()->deserialize(*sourceConfig);
m_deviceSourceEngine->getSource()->setCenterFrequency(centerFrequency);
}
else
{
qDebug("DeviceSourceAPI::loadSourceSettings: no source");
qDebug("DeviceSourceAPI::loadSourceSettings: deserializing no source");
}
}
else
{
qDebug("DeviceSourceAPI::loadSourceSettings: source %s[%d]: %s not found", qPrintable(m_sampleSourceId), m_sampleSourceSequence, qPrintable(m_sampleSourceSerial));
}
// set center frequency anyway
if (m_sampleSourcePluginInstanceUI != 0) // GUI flavor
{
m_sampleSourcePluginInstanceUI->setCenterFrequency(centerFrequency);
}
else if (m_deviceSourceEngine->getSource() != 0) // Server flavor
{
m_deviceSourceEngine->getSource()->setCenterFrequency(centerFrequency);
}
else
{
qDebug("DeviceSourceAPI::loadSourceSettings: no source");
}
}
else
{