From e7cb9984371626e3730c680526d660573564dba7 Mon Sep 17 00:00:00 2001 From: f4exb Date: Thu, 29 Jun 2023 00:50:39 +0200 Subject: [PATCH] SSB demod: optimize audio buffer size --- plugins/channelrx/demodssb/ssbdemodsink.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/channelrx/demodssb/ssbdemodsink.cpp b/plugins/channelrx/demodssb/ssbdemodsink.cpp index d35b23d24..781797dda 100644 --- a/plugins/channelrx/demodssb/ssbdemodsink.cpp +++ b/plugins/channelrx/demodssb/ssbdemodsink.cpp @@ -60,7 +60,7 @@ SSBDemodSink::SSBDemodSink() : m_channelSampleRate = 48000; m_channelFrequencyOffset = 0; - m_audioBuffer.resize(1<<14); + m_audioBuffer.resize(m_audioSampleRate / 10); m_audioBufferFill = 0; m_undersampleCount = 0; m_sum = 0; @@ -312,7 +312,8 @@ void SSBDemodSink::applyAudioSampleRate(int sampleRate) m_audioFifo.setSize(sampleRate); m_audioSampleRate = sampleRate; - + m_audioBuffer.resize(sampleRate / 10); + m_audioBufferFill = 0; QList pipes; MainCore::instance()->getMessagePipes().getMessagePipes(m_channel, "reportdemod", pipes);