From c4d6bc834d8ba6a3c3748996cd56706addfe4df2 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 2 Jul 2013 22:47:28 -0600 Subject: [PATCH] Fix sample rate for multichannel, non-legacy files --- wdq2wav.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wdq2wav.cpp b/wdq2wav.cpp index be084f8..23e764b 100644 --- a/wdq2wav.cpp +++ b/wdq2wav.cpp @@ -467,7 +467,7 @@ WindaqFile::ReadHeader () if (m_bLegacy_format) m_sample_rate = (double) m_sr_numer / (double) (m_sr_denom * m_nChannels); else - m_sample_rate = (double) m_nChannels / m_time_between_channel_samples; + m_sample_rate = (double) 1 / m_time_between_channel_samples; lseek (m_fd, 36, SEEK_SET); if (! read_int4 (m_fd, m_time_acq_start)) -- 2.34.1