From 64f796061f1be317a4fe346089c78015d42f575c Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 23 Feb 2016 18:28:37 +0000 Subject: [PATCH] Fix regression when reading WAV files Decoder needs the number of samples not the number of bytes. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6489 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 375abb8d7..ddcad7901 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1616,7 +1616,7 @@ void MainWindow::read_wav_file (QString const& fname) auto sample_size = static_cast (file.format ().sampleSize ()); wav12_ (dec_data.d2, dec_data.d2, &n, &sample_size); } - dec_data.params.kin = n; + dec_data.params.kin = n / file.format ().bytesPerFrame (); dec_data.params.newdat = 1; }); m_wav_future_watcher.setFuture(m_wav_future); // call diskDat() when done