From 28c6e2af0ac02acb20c18174b33d864bedef6017 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Tue, 5 Nov 2019 15:54:43 -0500 Subject: [PATCH] Fixed issue with loading wave files for decode --- mainwindow.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 231d4ac..f08914b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -3973,16 +3973,28 @@ bool MainWindow::decodeReady(int submode, int period, int *pSubmode, int *pPerio bool couldDecodeD = false; #endif - // set the params for starting positions and sizes for decode - dec_data.params.kposA = cycleSampleStartA; - dec_data.params.kposB = cycleSampleStartB; - dec_data.params.kposC = cycleSampleStartC; - dec_data.params.kposD = cycleSampleStartD; - dec_data.params.kszA = qMax(framesNeededA, k-cycleSampleStartA); - dec_data.params.kszB = qMax(framesNeededB, k-cycleSampleStartB); - dec_data.params.kszC = qMax(framesNeededC, k-cycleSampleStartC); - dec_data.params.kszD = qMax(framesNeededD, k-cycleSampleStartD); - dec_data.params.nsubmodes = 0; + if(m_diskData){ + dec_data.params.kposA = 0; + dec_data.params.kposB = 0; + dec_data.params.kposC = 0; + dec_data.params.kposD = 0; + dec_data.params.kszA = NTMAX*RX_SAMPLE_RATE-1; + dec_data.params.kszB = NTMAX*RX_SAMPLE_RATE-1; + dec_data.params.kszC = NTMAX*RX_SAMPLE_RATE-1; + dec_data.params.kszD = NTMAX*RX_SAMPLE_RATE-1; + dec_data.params.nsubmodes = 0; + } else { + // set the params for starting positions and sizes for decode + dec_data.params.kposA = cycleSampleStartA; + dec_data.params.kposB = cycleSampleStartB; + dec_data.params.kposC = cycleSampleStartC; + dec_data.params.kposD = cycleSampleStartD; + dec_data.params.kszA = qMax(framesNeededA, k-cycleSampleStartA); + dec_data.params.kszB = qMax(framesNeededB, k-cycleSampleStartB); + dec_data.params.kszC = qMax(framesNeededC, k-cycleSampleStartC); + dec_data.params.kszD = qMax(framesNeededD, k-cycleSampleStartD); + dec_data.params.nsubmodes = 0; + } bool multi = ui->actionModeMultiDecoder->isChecked(); int decodes = 0;