From 7ca37015588adb2dee7054808e5bc6849dc4ff41 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Tue, 25 Feb 2003 18:18:45 +0000 Subject: [PATCH] r4123: Auto commit for Debian build --- wdq2wav.cpp | 6 +++--- wdq2wav.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/wdq2wav.cpp b/wdq2wav.cpp index dd98f6b..90bb1b3 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.23 2003/02/25 18:18:45 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.23 2003/02/25 18:18:45 kevin Exp $"; bool g_quiet = false; bool g_verbose = false; @@ -509,7 +509,7 @@ 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(wdq.m_nSamples); int mean = nearest(dmean); for (i = 0; i < r_wdq.m_nSamples; i++) m_data[i] -= mean; diff --git a/wdq2wav.h b/wdq2wav.h index 7920136..5dd00ce 100644 --- a/wdq2wav.h +++ b/wdq2wav.h @@ -8,7 +8,7 @@ ** ** Copyright (c) 2003 Kevin Rosenberg ** -** $Id: wdq2wav.h,v 1.14 2003/02/25 18:15:52 kevin Exp $ +** $Id: wdq2wav.h,v 1.15 2003/02/25 18:18:26 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 @@ -132,6 +132,7 @@ class WavFile bool fill_header(); }; +template inline T nearest (double x) { return (x > 0 ? -- 2.34.1