1 /*****************************************************************************
5 ** Purpose: Header file for wdq2wav.cpp
6 ** Programmer: Kevin Rosenberg <kevin@rosenberg.net>
7 ** Date Started: Jan 2003
9 ** Copyright (c) 2003 Kevin Rosenberg
11 ** $Id: wdq2wav.h,v 1.6 2003/01/21 09:38:59 kevin Exp $
13 ** This program is free software; you can redistribute it and/or modify
14 ** it under the terms of the GNU General Public License (version 2) as
15 ** published by the Free Software Foundation.
17 ** This program is distributed in the hope that it will be useful,
18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ** GNU General Public License for more details.
22 ** You should have received a copy of the GNU General Public License
23 ** along with this program; if not, write to the Free Software
24 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 ******************************************************************************/
37 extern const char* g_szIdStr;
39 extern bool g_verbose;
42 #define MAX_INPUT_STR 256
44 void error_msg (const char *msg);
45 void info_msg (const char *msg);
46 void info_msg_sans_newline (const char *msg);
48 bool wdq2wav (const char* wdq_fname, const int channel, const char *wav_fname);
53 WindaqFile (const char* fname);
57 std::string m_strFile;
61 unsigned int m_nChannels;
62 unsigned int m_nSamples;
64 unsigned int m_sr_denom, m_sr_numer;
65 unsigned int m_nHeader_bytes, m_channel_offset, m_nBytes_channel_header;
66 unsigned int m_nData_bytes;
67 unsigned long int m_time_acq_start;
68 unsigned long int m_time_acq_stop;
75 unsigned int m_channel;
79 signed short int *m_data;
81 signed short int m_min_raw_data;
82 signed short int m_max_raw_data;
83 double m_max_scaled_data;
84 double m_min_scaled_data;
86 WindaqChannel (WindaqFile& wdq, const int channel);
90 bool read_channel_data();
97 std::string m_strFile;
100 unsigned long int m_nSamples;
102 unsigned int m_nChannels;
103 unsigned int m_nBitsPerSample;
104 unsigned int m_nBytesPerSample;
105 signed short int* m_data;
107 WavFile (WindaqChannel& wdq_channel, const char* fname);