1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-14 15:33:34 -04:00

Remote output/source: implemented choice of sample size in transmission. Fixes in the size conversion routines

This commit is contained in:
f4exb
2021-12-19 11:30:48 +01:00
parent 6cc1616cb8
commit 9278b12e25
21 changed files with 207 additions and 34 deletions
+5 -5
View File
@@ -77,7 +77,7 @@ void RemoteDataReadQueue::setSize(uint32_t size)
}
}
void RemoteDataReadQueue::readSample(Sample& s)
void RemoteDataReadQueue::readSample(Sample& s, bool isTx)
{
// depletion/repletion state
if (m_dataFrame == nullptr)
@@ -89,7 +89,7 @@ void RemoteDataReadQueue::readSample(Sample& s)
qDebug("RemoteDataReadQueue::readSample: initial pop new frame: queue size: %u", length());
m_blockIndex = 1;
m_sampleIndex = 0;
convertDataToSample(s, m_blockIndex, m_sampleIndex);
convertDataToSample(s, m_blockIndex, m_sampleIndex, isTx);
m_sampleIndex++;
}
else
@@ -107,7 +107,7 @@ void RemoteDataReadQueue::readSample(Sample& s)
if (m_sampleIndex < samplesPerBlock)
{
convertDataToSample(s, m_blockIndex, m_sampleIndex);
convertDataToSample(s, m_blockIndex, m_sampleIndex, isTx);
m_sampleIndex++;
m_sampleCount++;
}
@@ -118,7 +118,7 @@ void RemoteDataReadQueue::readSample(Sample& s)
if (m_blockIndex < RemoteNbOrginalBlocks)
{
convertDataToSample(s, m_blockIndex, m_sampleIndex);
convertDataToSample(s, m_blockIndex, m_sampleIndex, isTx);
m_sampleIndex++;
m_sampleCount++;
}
@@ -133,7 +133,7 @@ void RemoteDataReadQueue::readSample(Sample& s)
{
m_blockIndex = 1;
m_sampleIndex = 0;
convertDataToSample(s, m_blockIndex, m_sampleIndex);
convertDataToSample(s, m_blockIndex, m_sampleIndex, isTx);
m_sampleIndex++;
m_sampleCount++;
}