1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-01 16:38:06 -04:00

Sample MO FIFO: method to resize data vectors

This commit is contained in:
f4exb
2019-10-31 08:44:21 +01:00
parent c04369f4f1
commit 08eaca8c0c
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -38,6 +38,22 @@ void SampleMOFifo::init(unsigned int nbStreams, unsigned int size)
}
}
void SampleMOFifo::resize(unsigned int size)
{
m_size = size;
m_readCount = 0;
m_readHead = 0;
m_writeHead = size/8;
for (unsigned int stream = 0; stream < m_nbStreams; stream++)
{
m_data[stream].resize(size);
m_vReadCount.push_back(0);
m_vReadHead.push_back(0);
m_vWriteHead.push_back(size/8);
}
}
SampleMOFifo::SampleMOFifo(QObject *parent) :
QObject(parent),
m_nbStreams(0),