1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-24 11:04:10 -04:00

UDP source: send audio samples always on 16 bits. Options to send raw I/Q in either 16 or 24 bits regardless of sample size at compile time

This commit is contained in:
f4exb
2018-04-19 13:34:22 +02:00
parent da362823dc
commit befc08f2e1
9 changed files with 54 additions and 105 deletions
+3 -13
View File
@@ -31,8 +31,7 @@ UDPSrcSettings::UDPSrcSettings() :
void UDPSrcSettings::resetToDefaults()
{
m_outputSampleRate = 48000;
m_sampleFormat = FormatIQ;
m_sampleSize = Size16bits;
m_sampleFormat = FormatIQ16;
m_inputFrequencyOffset = 0;
m_rfBandwidth = 12500;
m_fmDeviation = 2500;
@@ -78,7 +77,6 @@ QByteArray UDPSrcSettings::serialize() const
s.writeS32(17, m_squelchGate);
s.writeBool(18, m_agc);
s.writeString(19, m_title);
s.writeS32(20, (int) m_sampleFormat);
return s.final();
@@ -108,12 +106,12 @@ bool UDPSrcSettings::deserialize(const QByteArray& data)
d.readS32(2, &s32tmp, 0);
m_inputFrequencyOffset = s32tmp;
d.readS32(3, &s32tmp, FormatIQ);
d.readS32(3, &s32tmp, FormatIQ16);
if ((s32tmp >= 0) && (s32tmp < (int) FormatNone)) {
m_sampleFormat = (SampleFormat) s32tmp;
} else {
m_sampleFormat = FormatIQ;
m_sampleFormat = FormatIQ16;
}
d.readReal(4, &m_outputSampleRate, 48000.0);
@@ -136,14 +134,6 @@ bool UDPSrcSettings::deserialize(const QByteArray& data)
d.readBool(18, &m_agc, false);
d.readString(19, &m_title, "UDP Sample Source");
d.readS32(20, &s32tmp, Size16bits);
if ((s32tmp >= 0) && (s32tmp < (int) SizeNone)) {
m_sampleSize = (SampleSize) s32tmp;
} else {
m_sampleSize = Size16bits;
}
return true;
}
else