1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-19 06:41:47 -05:00

SDRdaemon plugin: use a fixed time bound raw buffer of 8 seconds

This commit is contained in:
f4exb 2016-03-16 05:51:22 +01:00
parent 17d58ba2a5
commit d5f65a7e39

View File

@ -25,7 +25,7 @@
const int SDRdaemonBuffer::m_udpPayloadSize = 512; const int SDRdaemonBuffer::m_udpPayloadSize = 512;
const int SDRdaemonBuffer::m_sampleSize = 2; const int SDRdaemonBuffer::m_sampleSize = 2;
const int SDRdaemonBuffer::m_iqSampleSize = 2 * m_sampleSize; const int SDRdaemonBuffer::m_iqSampleSize = 2 * m_sampleSize;
const int SDRdaemonBuffer::m_rawBufferLengthSeconds = 4; // should be even const int SDRdaemonBuffer::m_rawBufferLengthSeconds = 8; // should be even
SDRdaemonBuffer::SDRdaemonBuffer(uint32_t throttlems) : SDRdaemonBuffer::SDRdaemonBuffer(uint32_t throttlems) :
m_throttlemsNominal(throttlems), m_throttlemsNominal(throttlems),
@ -88,10 +88,6 @@ void SDRdaemonBuffer::updateBufferSize(uint32_t sampleRate)
{ {
uint32_t rawSize = sampleRate * m_iqSampleSize * m_rawBufferLengthSeconds; // store worth of this seconds of samples at this sample rate uint32_t rawSize = sampleRate * m_iqSampleSize * m_rawBufferLengthSeconds; // store worth of this seconds of samples at this sample rate
if (rawSize < (1<<24)) {
rawSize = (1<<24);
}
if (rawSize != m_rawSize) if (rawSize != m_rawSize)
{ {
m_rawSize = rawSize; m_rawSize = rawSize;