mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-12 11:26:11 -05:00
AirspyHF support: specify int16 samples
This commit is contained in:
parent
7173f1b248
commit
89b67b0378
@ -134,6 +134,8 @@ bool AirspyHFInput::openDevice()
|
|||||||
|
|
||||||
delete[] sampleRates;
|
delete[] sampleRates;
|
||||||
|
|
||||||
|
airspyhf_set_sampleformat(m_dev, AIRSPYHF_SAMPLE_FORMAT_INT16);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -387,6 +389,7 @@ bool AirspyHFInput::applySettings(const AirspyHFSettings& settings, bool force)
|
|||||||
|| (m_settings.m_transverterMode != settings.m_transverterMode)
|
|| (m_settings.m_transverterMode != settings.m_transverterMode)
|
||||||
|| (m_settings.m_transverterDeltaFrequency != settings.m_transverterDeltaFrequency))
|
|| (m_settings.m_transverterDeltaFrequency != settings.m_transverterDeltaFrequency))
|
||||||
{
|
{
|
||||||
|
m_settings.m_LOppmTenths = settings.m_LOppmTenths;
|
||||||
qint64 deviceCenterFrequency = settings.m_centerFrequency;
|
qint64 deviceCenterFrequency = settings.m_centerFrequency;
|
||||||
deviceCenterFrequency -= settings.m_transverterMode ? settings.m_transverterDeltaFrequency : 0;
|
deviceCenterFrequency -= settings.m_transverterMode ? settings.m_transverterDeltaFrequency : 0;
|
||||||
deviceCenterFrequency = deviceCenterFrequency < 0 ? 0 : deviceCenterFrequency;
|
deviceCenterFrequency = deviceCenterFrequency < 0 ? 0 : deviceCenterFrequency;
|
||||||
|
@ -254,22 +254,34 @@ void DeviceSourceAPI::loadSourceSettings(const Preset* preset)
|
|||||||
if (m_sampleSourcePluginInstanceUI != 0) // GUI flavor
|
if (m_sampleSourcePluginInstanceUI != 0) // GUI flavor
|
||||||
{
|
{
|
||||||
m_sampleSourcePluginInstanceUI->deserialize(*sourceConfig);
|
m_sampleSourcePluginInstanceUI->deserialize(*sourceConfig);
|
||||||
m_sampleSourcePluginInstanceUI->setCenterFrequency(centerFrequency);
|
|
||||||
}
|
}
|
||||||
else if (m_deviceSourceEngine->getSource() != 0) // Server flavor
|
else if (m_deviceSourceEngine->getSource() != 0) // Server flavor
|
||||||
{
|
{
|
||||||
m_deviceSourceEngine->getSource()->deserialize(*sourceConfig);
|
m_deviceSourceEngine->getSource()->deserialize(*sourceConfig);
|
||||||
m_deviceSourceEngine->getSource()->setCenterFrequency(centerFrequency);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug("DeviceSourceAPI::loadSourceSettings: no source");
|
qDebug("DeviceSourceAPI::loadSourceSettings: deserializing no source");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
qDebug("DeviceSourceAPI::loadSourceSettings: source %s[%d]: %s not found", qPrintable(m_sampleSourceId), m_sampleSourceSequence, qPrintable(m_sampleSourceSerial));
|
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
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user