X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=wdq2wav.cpp;h=510294b9d48406d6ee0f14ba5e8e8c28ef72de9f;hb=1c71e531474edc2c706b71d615f7fc77b41eef55;hp=dd98f6b1ae70a604ebec63a823f6be10173b79e4;hpb=55fc5ba6b5c1a35195d12422f0bd956195e00c4a;p=wdq2wav.git diff --git a/wdq2wav.cpp b/wdq2wav.cpp index dd98f6b..510294b 100644 --- a/wdq2wav.cpp +++ b/wdq2wav.cpp @@ -8,7 +8,7 @@ ** ** Copyright (c) 2003 Kevin Rosenberg ** -** $Id: wdq2wav.cpp,v 1.22 2003/02/25 18:15:06 kevin Exp $ +** $Id: wdq2wav.cpp,v 1.25 2003/02/25 18:24:48 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -26,7 +26,7 @@ #include -const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.22 2003/02/25 18:15:06 kevin Exp $"; +const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.25 2003/02/25 18:24:48 kevin Exp $"; bool g_quiet = false; bool g_verbose = false; @@ -509,8 +509,11 @@ WindaqChannel::read_channel_data () m_min_scaled_data = (m_slope * data_min) + m_intercept; if (g_demean) { - double dmean = total_data / static_cast wdq.m_nSamples; + double dmean = total_data / static_cast(r_wdq.m_nSamples); int mean = nearest(dmean); + std::cout << "Removing mean: " << (dmean * m_slope) + m_intercept << + " " << m_units << std::endl; + for (i = 0; i < r_wdq.m_nSamples; i++) m_data[i] -= mean; }