wdq2wav-1.0.0/0000755000175000017500000000000012224100204012100 5ustar kevinkevinwdq2wav-1.0.0/wdq2wav.h0000644000175000017500000000702712224065327013672 0ustar kevinkevin/***************************************************************************** ** FILE IDENTIFICATION ** ** Name: wdq2wav.h ** Purpose: Header file for wdq2wav.cpp ** Programmer: Kevin Rosenberg ** Date Started: Jan 2003 ** ** Copyright (c) 2003 Kevin Rosenberg ** ** $Id$ ** ** 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 ** published by the Free Software Foundation. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #ifdef _WIN32 #include #include #else #include #endif #ifdef __linux__ #include #if __BYTE_ORDER == __BIG_ENDIAN #define WORDS_BIG_ENDIAN 1 #endif #endif extern const char* g_szIdStr; extern bool g_quiet; extern bool g_verbose; extern bool g_debug; #define MAX_INPUT_STR 256 void error_msg (const char *msg); void info_msg (const char *msg); void info_msg_sans_newline (const char *msg); bool wdq2wav (const char* wdq_fname, const int channel, const char *wav_fname, bool play); class WindaqFile { public: WindaqFile (const char* fname); ~WindaqFile (); bool ReadHeader(); bool m_valid; std::string m_error; int m_fd; bool m_bLegacy_format; bool m_bHires; int m_nMaxChannels; int m_nChannels; unsigned long int m_nSamples; double m_sample_rate; std::string m_strFile; unsigned int m_sr_denom, m_sr_numer; unsigned short int m_nHeader_bytes, m_channel_offset, m_nBytes_channel_header; unsigned int m_nData_bytes; unsigned int m_time_acq_start; unsigned int m_time_acq_stop; double m_time_between_channel_samples; bool any_packed_channels(); bool is_channel_packed(int iChannel); }; class WindaqChannel { public: WindaqFile& r_wdq; signed short int *m_data; double m_slope; double m_intercept; unsigned int m_channel; bool m_valid; std::string m_units; signed short int m_min_raw_data; signed short int m_max_raw_data; double m_max_scaled_data; double m_min_scaled_data; double m_raw_mean; WindaqChannel (WindaqFile& wdq, const int channel); ~WindaqChannel (); double raw2measured(signed short int raw) const { return (raw * m_slope) + m_intercept; } private: bool read_channel_data(); }; class WavFile { public: bool m_valid; signed short int* m_data; unsigned long int m_nSamples; std::string m_strFile; int m_fd; double m_rate; unsigned int m_nChannels; unsigned int m_nBitsPerSample; unsigned int m_nBytesPerSample; unsigned long int m_nHeaderBytes; long int m_nDataBytes; long int m_nFileBytes; WavFile (WindaqChannel& wdq_channel, const char* fname); ~WavFile (); bool WriteFile (); bool Play(); private: bool fill_header(); }; template inline T nearest (double x) { return (x > 0 ? static_cast(x+0.5) : static_cast(x-0.5)); } wdq2wav-1.0.0/wdq2wav.cpp0000644000175000017500000005156612224077771014242 0ustar kevinkevin/***************************************************************************** ** FILE IDENTIFICATION ** ** Name: wdq2wav.cpp ** Purpose: Converts a channel of WinDAQ file to .WAV format ** Programmer: Kevin Rosenberg ** Date Started: Jan 2003 ** ** Copyright (c) 2003 Kevin Rosenberg ** ** 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 ** published by the Free Software Foundation. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program; if not, write to the Free Software ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ #include #include bool g_quiet = false; bool g_verbose = false; bool g_debug = false; bool g_dry_run = false; bool g_ignore_zero = false; bool g_dont_demean = false; #ifdef WIN32 #define lseek _lseek #define close _close #define open _open #define read _read #define write _write #define O_BINARY _O_BINARY #define O_RDONLY _O_RDONLY #define O_WRONLY _O_WRONLY #define O_RDWR _O_RDRW #define O_TRUNC _O_TRUNC #define O_CREAT _O_CREAT const int g_fileMode = _S_IWRITE | _S_IREAD; struct fpos_t std::_Fpz = {0,0}; #else const int g_fileMode = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH; // Define as NULL for non-Windows platforms #ifndef O_BINARY #define O_BINARY 0 #endif #endif void error_msg (const char *msg) { std::cerr << msg << std::endl; } void info_msg (const char* msg) { std::cout << msg << std::endl; } void info_msg_sans_newline (const char* msg) { std::cout << msg; } const char* fileBasename (const char* filename) { const char* pslash = strrchr (filename, '/'); const char* pbackslash = strrchr (filename, '\\'); const char* p = filename; if (pbackslash && (! pslash || pbackslash >= pslash)) p = pbackslash+1; else if (pslash && (! pbackslash || pslash >= pbackslash)) p = pslash+1; return p; } char * str_rm_tail (char *str, const char* const charlist) { int i; for (i = strlen(str) - 1; i >= 0; i--) if (strchr (charlist, str[i]) != NULL) str[i] = 0; else break; /* found non-specified char, all done */ return (str); } char * str_wrm_tail (char *str) { return (str_rm_tail(str, "\b\t\n\r")); } void usage (const char* progname) { std::cout << "usage: " << fileBasename (progname) << " [OPTIONS] \n"; std::cout << "OPTIONS\n"; std::cout << " -p Play channel through audio system\n"; std::cout << " -q Supress all messages\n"; std::cout << " -z Scale output without preserving zero point\n"; std::cout << " -m Do not demean the data (don't subtract the mean value from each sample)\n"; std::cout << " -n Dry run (do not create any output\n"; std::cout << " -v Verbose mode\n"; std::cout << " -d Debug mode\n"; std::cout << " -h Print this help message\n"; } int main (int argc, char *argv[]) { int c; bool play = false; const char* progname = argv[0]; while ((c = getopt (argc, argv, "rqvzmndph")) != -1) { switch (c) { case 'q': g_quiet = true; break; case 'm': g_dont_demean = true; break; case 'n': g_dry_run = true; break; case 'z': g_ignore_zero = true; break; case 'v': g_verbose = true; break; case 'd': g_debug = true; break; case 'p': play = true; break; case 'h': usage (progname); return (0); case '?': default: usage (progname); return (1); } } argc -= optind; argv += optind; if (argc > 3) { std::cerr << "Too many parameters\n"; usage (progname); return (1); } char wdq_fname[MAX_INPUT_STR]; if (argc >= 1) strncpy (wdq_fname, argv [0], MAX_INPUT_STR); else { std::cout << "Enter input WinDAQ filename: "; std::cin.getline (wdq_fname, MAX_INPUT_STR); } char channel_buf [MAX_INPUT_STR]; if (argc >= 2) strncpy (channel_buf, argv[1], MAX_INPUT_STR); else { std::cout << "Enter channel number: "; std::cin.getline (channel_buf, MAX_INPUT_STR); } char *channel_endptr; int channel = static_cast(strtol (channel_buf, &channel_endptr, 10)); if (*channel_endptr != 0) { std::ostringstream os; os << "Error: Channel " << channel_buf << " is not an integer"; error_msg (os.str().c_str()); usage (progname); return (1); } char wav_fname[MAX_INPUT_STR]; if (! g_dry_run) { if (argc >= 3) strncpy (wav_fname, argv[2], MAX_INPUT_STR); else { std::cout << "Enter output wav filename: "; std::cin.getline (wav_fname, MAX_INPUT_STR); } } if (! wdq2wav (wdq_fname, channel, wav_fname, play)) return 1; return 0; } bool wdq2wav (const char* wdq_fname, const int channel, const char *wav_fname, bool play) { WindaqFile wdq (wdq_fname); if (! wdq.ReadHeader()) { if (wdq.m_error.size()) { std::ostringstream os; os << "Error reading file " << wdq_fname << ": " << wdq.m_error.c_str(); error_msg (os.str().c_str()); } else { std::ostringstream os; os << "Error reading file " << wdq_fname; error_msg (os.str().c_str()); } return false; } if (wdq.any_packed_channels()) { std::ostringstream os; os << "File contains 'packed' channels." << std::endl; os << "Convert to 'Advanced CODAS headers' before processing with wdq2wav."; error_msg (os.str().c_str()); return false; } if (! g_quiet || g_verbose || g_debug) { std::ostringstream os1; os1 << "File: " << wdq_fname; info_msg (os1.str().c_str()); std::ostringstream os; os << "Format: " << (wdq.m_bLegacy_format ? "Legacy" : "Non-legacy"); info_msg(os.str().c_str()); std::ostringstream os2; time_t time = wdq.m_time_acq_start; struct tm* tm = gmtime (&time); os2 << "Time File Creation: " << asctime(tm); info_msg_sans_newline (os2.str().c_str()); std::ostringstream os3; time = wdq.m_time_acq_stop; tm = gmtime (&time); os3 << "Time File Written: " << asctime(tm); info_msg_sans_newline (os3.str().c_str()); std::ostringstream os4; os4 << "Samples: " << wdq.m_nSamples << ", Channels: " << wdq.m_nChannels << ", Sample Rate: " << wdq.m_sample_rate; info_msg (os4.str().c_str()); } WindaqChannel wdq_channel (wdq, channel); if (! wdq_channel.m_valid) { error_msg ("Error reading data from channel"); return false; } if (! g_quiet || g_verbose || g_debug) { std::ostringstream os1; os1 << "Channel " << channel << ", Units: " << wdq_channel.m_units << ", Minimum: " << wdq_channel.m_min_raw_data << " (" << wdq_channel.raw2measured(wdq_channel.m_min_raw_data) << "), Maximum: " << wdq_channel.m_max_raw_data << " (" << wdq_channel.raw2measured(wdq_channel.m_max_raw_data) << ")"; info_msg (os1.str().c_str()); std::cout << "Mean: " << wdq_channel.raw2measured(wdq_channel.m_raw_mean) << " " << wdq_channel.m_units; } if (! g_dry_run && !g_dont_demean) { std::cout << " (removing)\n"; int mean = nearest(wdq_channel.m_raw_mean); for (unsigned int i = 0; i < wdq.m_nSamples; i++) wdq_channel.m_data[i] -= mean; } else { std::cout << " (not removing)\n"; } if (g_debug) { std::ostringstream os4; os4 << " Scaled minimum: " << wdq_channel.m_min_scaled_data << ", maximum: " << wdq_channel.m_max_scaled_data; info_msg (os4.str().c_str()); std::ostringstream os5; os5 << " Slope " << wdq_channel.m_slope << ", Intercept " << wdq_channel.m_intercept; info_msg (os5.str().c_str()); } if (g_dry_run) return true; WavFile wav (wdq_channel, wav_fname); if (! wav.m_valid) { error_msg ("Error extracting wav from channel"); return false; } if (! wav.WriteFile ()) { error_msg ("Error writing file"); return false; } if (play) wav.Play(); return true; } WindaqFile::WindaqFile (const char* fname) : m_valid(false), m_fd(0), m_nChannels(0), m_nSamples(0), m_sample_rate(0), m_strFile (fname) { } WindaqFile::~WindaqFile () { if (m_fd != 0) close (m_fd); } bool read_int1 (int fd, unsigned char& n) { unsigned char tmp1; if (read (fd, &tmp1, 1) != 1) return false; n = tmp1; return true; } bool read_int2 (int fd, unsigned short int& n) { unsigned char tmp1; unsigned int tmp2; if (read (fd, &tmp1, 1) != 1) return false; tmp2 = tmp1; if (read (fd, &tmp1, 1) != 1) return false; n = tmp2 + (tmp1 * 256); return true; } bool read_int4 (int fd, unsigned int& n) { unsigned int tmp4; unsigned short int tmp2; if (! read_int2 (fd, tmp2)) return false; tmp4 = tmp2; if (! read_int2 (fd, tmp2)) return false; n = tmp4 + (tmp2 * 65536); return true; } bool read_float8 (int fd, double& f) { unsigned char p[8]; if (read (fd, p, 8) != 8) return false; #if WORDS_BIG_ENDIAN unsigned char c; c = p[0]; p[0] = p[7]; p[7] = c; c = p[1]; p[1] = p[6]; p[6] = c; c = p[2]; p[2] = p[5]; p[5] = c; c = p[3]; p[3] = p[4]; p[4] = c; #endif double *pd = reinterpret_cast(&p[0]); f = *pd; return true; } bool WindaqFile::ReadHeader () { m_valid = false; if ((m_fd = open (m_strFile.c_str(), O_RDONLY | O_BINARY)) < 0) { m_error = "Unable to open file"; return false; } lseek (0, 0, SEEK_SET); unsigned short int element1; if (! read_int2 (m_fd, element1)) return false; short unsigned int byte1 = (element1 & 0xFF00) >> 8; short unsigned int byte2 = element1 & 0xFF; if (byte1 == 0 || byte1 == 1) { m_bLegacy_format = false; m_sr_denom = m_sr_numer = 0; } else { m_sr_denom = (element1 & 0x7fff) >> 5; m_sr_numer = (element1 & 0x8000) << 1; m_bLegacy_format = true; } unsigned short int element2; if (! read_int2 (m_fd, element2)) return false; if (m_bLegacy_format) m_sr_numer |= element2; unsigned char element3; if (! read_int1 (m_fd, element3)) return false; m_channel_offset = element3; if (g_debug) std::cout << "Channel offset: " << m_channel_offset << std::endl; unsigned char element4; if (! read_int1 (m_fd, element4)) return false; m_nBytes_channel_header = element4; if (g_debug) std::cout << "Channel header bytes: " << m_nBytes_channel_header << std::endl; unsigned short int element5; if (! read_int2 (m_fd, element5)) return false; m_nHeader_bytes = element5; if (g_debug) std::cout << "Header bytes: " << m_nHeader_bytes << std::endl; m_nMaxChannels = (m_nHeader_bytes - 112) / 36; if (m_nMaxChannels >= 144) m_nChannels = byte2 & 0xFF; else m_nChannels = byte2 & 0x1F; unsigned int element6; if (! read_int4 (m_fd, element6)) return false; m_nData_bytes = element6; if (g_debug) std::cout << "Data bytes: " << m_nData_bytes << std::endl; m_nSamples = (m_nData_bytes / m_nChannels) / 2; lseek (m_fd, 28, SEEK_SET); double element13; if (! read_float8 (m_fd, element13)) return false; m_time_between_channel_samples = element13; if (m_bLegacy_format) m_sample_rate = (double) m_sr_numer / (double) (m_sr_denom * m_nChannels); else 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)) return false; if (! read_int4 (m_fd, m_time_acq_stop)) return false; lseek (m_fd, 100, SEEK_SET); unsigned short int element27; if (! read_int2 (m_fd, element27)) return false; m_bHires = (element27 & 0x0001) ? true : false; if (g_debug) { std::cout << "High resolution: "; if (m_bHires) std::cout << "Yes"; else std::cout << "No"; std::cout << std::endl; } // Verify Windaq signature lseek (m_fd, m_nHeader_bytes - 2, SEEK_SET); unsigned short int element35; if (! read_int2 (m_fd, element35)) return false; if (element35 != 0x8001) { std::ostringstream os; m_error = "Incorrect signagure: file is not a valid WinDAQ file"; return false; } m_valid = true; return true; } bool WindaqFile::any_packed_channels () { for (int iChannel = 0; iChannel < m_nChannels; iChannel++) if (is_channel_packed (iChannel)) return true; return false; } bool WindaqFile::is_channel_packed (const int channel) { long iStart = m_channel_offset + channel * m_nBytes_channel_header; lseek (m_fd, iStart + 31, SEEK_SET); unsigned char iReadings_per_data_point; if (! read_int1 (m_fd, iReadings_per_data_point)) return false; if (iReadings_per_data_point > 1) return true; return false; } WindaqChannel::WindaqChannel (WindaqFile& wdq, const int channel) : r_wdq(wdq), m_data(0), m_slope(0), m_intercept (0), m_channel(channel), m_valid(false) { if (wdq.m_valid) { if (channel >= 1 && channel <= wdq.m_nChannels) { if (read_channel_data()) m_valid = true; } else { std::ostringstream os; os << "Channel " << channel << " is invalid, valid range 1-" << wdq.m_nChannels; error_msg (os.str().c_str()); } } } WindaqChannel::~WindaqChannel () { if (m_data) delete m_data; } bool WindaqChannel::read_channel_data () { int fd = r_wdq.m_fd; m_data = new signed short int [r_wdq.m_nSamples * 2]; lseek (fd, r_wdq.m_channel_offset + 8 + (m_channel - 1) * r_wdq.m_nBytes_channel_header, SEEK_SET); if (! read_float8 (fd, m_slope)) return false; if (! read_float8 (fd, m_intercept)) return false; char units[7]; units[6] = 0; if (read (fd, units, 6) != 6) { error_msg ("Error reading file"); return false; } m_units = units; long int row_bytes = 2 * r_wdq.m_nChannels; signed short int *sample_row = new signed short int [row_bytes]; signed short int* psample = &sample_row[m_channel - 1]; lseek (fd, r_wdq.m_nHeader_bytes, SEEK_SET); unsigned long int i; signed short int data_max = 0, data_min = 0; double total_data = 0; for (i = 0; i < r_wdq.m_nSamples; i++) { if (read (fd, sample_row, row_bytes) != row_bytes) { std::ostringstream os; os << "Error reading file at " << i; error_msg (os.str().c_str()); delete sample_row; return false; } signed short int v = *psample; #if WORDS_BIG_ENDIAN unsigned char* p = reinterpret_cast(&v); unsigned char c = p[0]; p[0] = p[1]; p[1] = c; #endif signed short int value = v; if (! r_wdq.m_bHires) value >>= 2; m_data[i] = value; total_data += value; if (i == 0) { data_max = value; data_min = value; } else { if (value > data_max) data_max = value; else if (value < data_min) data_min = value; } } m_max_raw_data = data_max; m_min_raw_data = data_min; m_max_scaled_data = (m_slope * data_max) + m_intercept; m_min_scaled_data = (m_slope * data_min) + m_intercept; m_raw_mean = total_data / static_cast(r_wdq.m_nSamples); delete sample_row; return true; } WavFile::WavFile (WindaqChannel& wdq_channel, const char* fname) : m_valid(false), m_data(0), m_nSamples(0), m_strFile(fname), m_fd(0) { if (wdq_channel.m_valid) { m_nSamples = wdq_channel.r_wdq.m_nSamples; m_nChannels = 1; m_nBitsPerSample = 16; m_nBytesPerSample = 2; m_rate = wdq_channel.r_wdq.m_sample_rate; double data_offset = 0, data_scale = 0; if (g_ignore_zero) { data_offset = -wdq_channel.m_min_scaled_data; if (wdq_channel.m_max_scaled_data != wdq_channel.m_min_scaled_data) data_scale = 65535. / (wdq_channel.m_max_scaled_data - wdq_channel.m_min_scaled_data); } else { double max_value = fabs(wdq_channel.m_max_scaled_data); if (fabs (wdq_channel.m_min_scaled_data) > max_value) max_value = fabs (wdq_channel.m_min_scaled_data); if (max_value != 0.) data_scale = 32767. / max_value; } if (g_debug) { std::ostringstream os; os << " Wav data_scale: " << data_scale << ", data_offset: " << data_offset; info_msg (os.str().c_str()); } m_nHeaderBytes = 44; m_nDataBytes = m_nSamples * m_nBytesPerSample * m_nChannels; m_nFileBytes = m_nHeaderBytes + m_nDataBytes; unsigned int nHeaderShortInts = m_nHeaderBytes / sizeof(signed short int); m_data = new signed short int [m_nSamples + nHeaderShortInts]; signed short int* input = wdq_channel.m_data; signed short int* output = &m_data[nHeaderShortInts]; double slope = wdq_channel.m_slope; double intercept = wdq_channel.m_intercept; if (! fill_header ()) return; unsigned long int i; for (i = 0; i < m_nSamples; i++) { double value = input[i]; value = (slope * value) + intercept; if (g_ignore_zero) { value = (value + data_offset) * data_scale; value += 0.5 - 32768; } else { value = value * data_scale; } signed short int v = static_cast(value); #if WORDS_BIG_ENDIAN unsigned char* p = reinterpret_cast(&v); unsigned char c = p[0]; p[0] = p[1]; p[1] = c; #endif output[i] = v; } } m_valid = true; } WavFile::~WavFile () { if (m_fd != 0) close (m_fd); if (m_data != NULL) delete m_data; } void put_int4 (char* p, unsigned int n) { *p = n & 0xFF; *(p+1) = 0xFF & (n >> 8); *(p+2) = 0xFF & (n >> 16); *(p+3) = 0xFF & (n >> 24); } void put_int2 (char* p, unsigned short int n) { *p = n & 0xFF; *(p+1) = 0xFF & (n >> 8); } bool WavFile::fill_header () { char* pData = reinterpret_cast (m_data); strncpy (pData, "RIFF", 4); // Length of file after 8 byte header put_int4 (pData + 4, 36 + m_nDataBytes); strncpy (pData + 8, "WAVEfmt ", 8); // Length of header block put_int4 (pData + 16, 0x10); // Always 1 put_int2 (pData + 20, 1); /* Number of channels */ put_int2 (pData + 22, m_nChannels); // Sample Rate put_int4 (pData + 24, static_cast (m_rate + 0.5)); // Bytes per second put_int4 (pData + 28, static_cast (m_rate * m_nBytesPerSample + 0.5)); // Bytes per sample put_int2 (pData + 32, m_nBytesPerSample * m_nChannels); // Bits per sample put_int2 (pData + 34, m_nBitsPerSample); strncpy (pData + 36, "data", 4); put_int4 (pData + 40, m_nDataBytes); return true; } bool WavFile::WriteFile () { if (! m_valid) return false; if (m_fd == 0) if ((m_fd = open (m_strFile.c_str(), O_WRONLY | O_BINARY | O_TRUNC | O_CREAT, g_fileMode)) == 0) { std::ostringstream os; os << "Error opening output file " << m_strFile.c_str(); error_msg (os.str().c_str()); return false; } lseek (m_fd, 0, SEEK_SET); if (write (m_fd, m_data, m_nFileBytes) != m_nFileBytes) { error_msg ("Error writing file"); return false; } if (close (m_fd) < 0) error_msg ("Error closing output file"); m_fd = 0; return true; } #ifdef _WIN32 #include #include #elif defined(__linux__) #include #include #endif bool WavFile::Play () { #ifdef _WIN32 if (PlaySound ((LPCSTR) m_data, 0, SND_MEMORY | SND_NODEFAULT)) return true; #elif defined(__linux__) int fd; if ((fd = open ("/dev/dsp",O_WRONLY)) == -1) { error_msg ("Error opening /dev/dsp"); return false; } int format = AFMT_S16_LE; if (ioctl (fd, SNDCTL_DSP_SETFMT, &format) == -1) { error_msg ("Error setting DSP format"); close(fd); return false; } if (format != AFMT_S16_LE) { error_msg ("DSP Format not set"); close(fd); return false; } unsigned int channels = m_nChannels; if (ioctl (fd, SNDCTL_DSP_CHANNELS, &format) == -1) { error_msg ("Error setting number of channels"); close(fd); return false; } if (channels != m_nChannels) { error_msg ("Number of channels not set"); close(fd); return false; } unsigned int speed = static_cast(m_rate + 0.5); if (ioctl (fd, SNDCTL_DSP_SPEED, &speed) == -1) { error_msg ("Error setting sample rate"); close(fd); return false; } if (speed != m_rate && ! g_quiet) { std::ostringstream os; os << "Warning: Sample rate set to " << speed << ", not " << m_rate; error_msg (os.str().c_str()); } if (write (fd, reinterpret_cast(m_data) + m_nHeaderBytes, m_nDataBytes) != m_nDataBytes) { error_msg ("Error writing audio samples"); close(fd); return false; } close (fd); return true; #else #endif return false; } wdq2wav-1.0.0/msvc/0000755000175000017500000000000010667175526013104 5ustar kevinkevinwdq2wav-1.0.0/msvc/wdq2wav/0000755000175000017500000000000010667175526014477 5ustar kevinkevinwdq2wav-1.0.0/msvc/wdq2wav/getopt.h0000644000175000017500000001456610667175526016166 0ustar kevinkevin/* Declarations for getopt. Copyright (C) 1989,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GETOPT_H #ifdef HAVE_CONFIG_H #include "../config.h" #endif #ifndef __need_getopt # define _GETOPT_H 1 #endif #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { # if defined __STDC__ const char *name; # else char *name; # endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #if defined __STDC__ # ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int __argc, char *const *__argv, const char *__shortopts); # else /* not __GNU_LIBRARY__ */ /* extern int getopt (); */ # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ extern int getopt (); # ifndef __need_getopt extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind); extern int _getopt_internal (int __argc, char *const *__argv, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #endif /* __STDC__ */ #ifdef __cplusplus } #endif /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ wdq2wav-1.0.0/msvc/wdq2wav/getopt1.c0000644000175000017500000001144510667175526016233 0ustar kevinkevin/* getopt_long and getopt_long_only entry points for GNU getopt. Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "getopt.h" #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ #ifndef const #define const #endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 #include #if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION #define ELIDE_CODE #endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ #include #endif #ifndef NULL #define NULL 0 #endif int getopt_long (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); } /* Like getopt_long, but '-' as well as '--' can indicate a long option. If an option that starts with '-' (not '--') doesn't match a long option, but does match a short option, it is parsed as a short option instead. */ int getopt_long_only (argc, argv, options, long_options, opt_index) int argc; char *const *argv; const char *options; const struct option *long_options; int *opt_index; { return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } #endif /* Not ELIDE_CODE. */ #ifdef TEST #include int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; int option_index = 0; static struct option long_options[] = { {"add", 1, 0, 0}, {"append", 0, 0, 0}, {"delete", 1, 0, 0}, {"verbose", 0, 0, 0}, {"create", 0, 0, 0}, {"file", 1, 0, 0}, {0, 0, 0, 0} }; c = getopt_long (argc, argv, "abc:d:0123456789", long_options, &option_index); if (c == -1) break; switch (c) { case 0: printf ("option %s", long_options[option_index].name); if (optarg) printf (" with arg %s", optarg); printf ("\n"); break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case 'd': printf ("option d with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ wdq2wav-1.0.0/msvc/wdq2wav/wdq2wav.vcproj0000744000175000017500000000754510667175526017333 0ustar kevinkevin wdq2wav-1.0.0/msvc/wdq2wav/getopt.c0000644000175000017500000010376510667175526016161 0ustar kevinkevin/* Getopt for GNU. NOTE: getopt is now part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This tells Alpha OSF/1 not to define a getopt prototype in . Ditto for AIX 3.2 and . */ #ifndef _NO_PROTO # define _NO_PROTO #endif #ifdef HAVE_CONFIG_H //# include #endif #if !defined __STDC__ || !__STDC__ /* This is a separate conditional since some stdc systems reject `defined (const)'. */ # ifndef const # define const # endif #endif #include /* Comment out all this code if we are using the GNU C Library, and are not actually compiling the library itself. This code is part of the GNU C Library, but also included in many other GNU distributions. Compiling and linking in this code is a waste when using the GNU C library (especially if it is a shared library). Rather than having every GNU program understand `configure --with-gnu-libc' and omit the object files, it is simpler to just do this in the source for each such file. */ #define GETOPT_INTERFACE_VERSION 2 #if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 # include # if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION # define ELIDE_CODE # endif #endif #ifndef ELIDE_CODE /* This needs to come after some library #include to get __GNU_LIBRARY__ defined. */ #ifdef __GNU_LIBRARY__ /* Don't include stdlib.h for non-GNU C libraries because some of them contain conflicting prototypes for getopt. */ # include #ifndef WIN32 # include #endif #endif /* GNU C library. */ #ifdef VMS # include # if HAVE_STRING_H - 0 # include # endif #endif #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # ifdef HAVE_LIBINTL_H # include # define _(msgid) gettext (msgid) # else # define _(msgid) (msgid) # endif #endif /* This version of `getopt' appears to the caller like standard Unix `getopt' but it behaves differently for the user, since it allows the user to intersperse the options with the other arguments. As `getopt' works, it permutes the elements of ARGV so that, when it is done, all the options precede everything else. Thus all application programs are extended to handle flexible argument order. Setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. GNU application programs can use a third alternative mode in which they can distinguish the relative order of options and other arguments. */ #include "getopt.h" /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ #if ! defined(HAVE_GETOPT) && ! defined(HAVE_GETOPT_LONG) char *optarg; #endif /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ /* 1003.2 says this must be 1 before any call. */ #if ! defined(HAVE_GETOPT) && ! defined(HAVE_GETOPT_LONG) int optind = 1; #endif /* Formerly, initialization of getopt depended on optind==0, which causes problems with re-calling getopt as programs generally don't know that. */ #if ! defined(HAVE_GETOPT) && ! defined(HAVE_GETOPT_LONG) int __getopt_initialized; #else extern int __getopt_initialized; #endif /* The next char to be scanned in the option-element in which the last option character we returned was found. This allows us to pick up the scan where we left off. If this is zero, or a null string, it means resume the scan by advancing to the next ARGV-element. */ static char *nextchar; /* Callers store zero here to inhibit the error message for unrecognized options. */ #if ! defined(HAVE_GETOPT) && ! defined(HAVE_GETOPT_LONG) int opterr = 1; #endif /* Set to an option character which was unrecognized. This must be initialized on some systems to avoid linking in the system's own getopt implementation. */ #if ! defined(HAVE_GETOPT) && ! defined(HAVE_GETOPT_LONG) int optopt = '?'; #endif /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. The special argument `--' forces an end of option-scanning regardless of the value of `ordering'. In the case of RETURN_IN_ORDER, only `--' can cause `getopt' to return -1 with `optind' != ARGC. */ static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* Value of POSIXLY_CORRECT environment variable. */ static char *posixly_correct; #ifdef __GNU_LIBRARY__ /* We want to avoid inclusion of string.h with non-GNU libraries because there are many ways it can cause trouble. On some systems, it contains special magic macros that don't work in GCC. */ # include # define my_index strchr #else # if HAVE_STRING_H # include # else # include # endif /* Avoid depending on library functions or files whose names are inconsistent. */ #ifndef getenv extern char *getenv (); #endif static char * my_index (str, chr) const char *str; int chr; { while (*str) { if (*str == chr) return (char *) str; str++; } return 0; } /* If using GCC, we can safely declare strlen this way. If not using GCC, it is ok not to declare it. */ #ifdef __GNUC__ /* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. That was relevant to code that was here before. */ # if (!defined __STDC__ || !__STDC__) && !defined strlen /* gcc with -traditional declares the built-in strlen to return int, and has done so at least since version 2.4.5. -- rms. */ extern int strlen (const char *); # endif /* not __STDC__ */ #endif /* __GNUC__ */ #endif /* not __GNU_LIBRARY__ */ /* Handle permutation of arguments. */ /* Describe the part of ARGV that contains non-options that have been skipped. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. */ static int first_nonopt; static int last_nonopt; #ifdef _LIBC /* Bash 2.0 gives us an environment variable containing flags indicating ARGV elements that should not be considered arguments. */ /* Defined in getopt_init.c */ extern char *__getopt_nonoption_flags; static int nonoption_flags_max_len; static int nonoption_flags_len; static int original_argc; static char *const *original_argv; /* Make sure the environment variable bash 2.0 puts in the environment is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so that we can compare them later. But we must not use malloc(3). */ original_argc = argc; original_argv = argv; } # ifdef text_set_element text_set_element (__libc_subinit, store_args_and_env); # endif /* text_set_element */ # define SWAP_FLAGS(ch1, ch2) \ if (nonoption_flags_len > 0) \ { \ char __tmp = __getopt_nonoption_flags[ch1]; \ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ __getopt_nonoption_flags[ch2] = __tmp; \ } #else /* !_LIBC */ # define SWAP_FLAGS(ch1, ch2) #endif /* _LIBC */ /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,optind), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ #if defined __STDC__ && __STDC__ static void exchange (char **); #endif static void exchange (argv) char **argv; { int bottom = first_nonopt; int middle = last_nonopt; int top = optind; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ #ifdef _LIBC /* First make sure the handling of the `__getopt_nonoption_flags' string can work normally. Our top argument must be in the range of the string. */ if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) { /* We must extend the array. The user plays games with us and presents new arguments. */ char *new_str = malloc (top + 1); if (new_str == NULL) nonoption_flags_len = nonoption_flags_max_len = 0; else { memset (__mempcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len), '\0', top + 1 - nonoption_flags_max_len); nonoption_flags_max_len = top + 1; __getopt_nonoption_flags = new_str; } } #endif while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; SWAP_FLAGS (bottom + i, middle + i); } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ first_nonopt += (optind - last_nonopt); last_nonopt = optind; } /* Initialize the internal data when the first call is made. */ #if defined __STDC__ && __STDC__ static const char *_getopt_initialize (int, char *const *, const char *); #endif static const char * _getopt_initialize (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { /* Start processing options with ARGV-element 1 (since ARGV-element 0 is the program name); the sequence of previously skipped non-option ARGV-elements is empty. */ first_nonopt = last_nonopt = optind; nextchar = NULL; posixly_correct = getenv ("POSIXLY_CORRECT"); /* Determine how to handle the ordering of options and nonoptions. */ if (optstring[0] == '-') { ordering = RETURN_IN_ORDER; ++optstring; } else if (optstring[0] == '+') { ordering = REQUIRE_ORDER; ++optstring; } else if (posixly_correct != NULL) ordering = REQUIRE_ORDER; else ordering = PERMUTE; #ifdef _LIBC if (posixly_correct == NULL && argc == original_argc && argv == original_argv) { if (nonoption_flags_max_len == 0) { if (__getopt_nonoption_flags == NULL || __getopt_nonoption_flags[0] == '\0') nonoption_flags_max_len = -1; else { const char *orig_str = __getopt_nonoption_flags; int len = nonoption_flags_max_len = strlen (orig_str); if (nonoption_flags_max_len < argc) nonoption_flags_max_len = argc; __getopt_nonoption_flags = (char *) malloc (nonoption_flags_max_len); if (__getopt_nonoption_flags == NULL) nonoption_flags_max_len = -1; else memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), '\0', nonoption_flags_max_len - len); } } nonoption_flags_len = nonoption_flags_max_len; } else nonoption_flags_len = 0; #endif return optstring; } /* Scan elements of ARGV (whose length is ARGC) for option characters given in OPTSTRING. If an element of ARGV starts with '-', and is not exactly "-" or "--", then it is an option element. The characters of this element (aside from the initial '-') are option characters. If `getopt' is called repeatedly, it returns successively each of the option characters from each of the option elements. If `getopt' finds another option character, it returns that character, updating `optind' and `nextchar' so that the next call to `getopt' can resume the scan with the following option character or ARGV-element. If there are no more option characters, `getopt' returns -1. Then `optind' is the index in ARGV of the first ARGV-element that is not an option. (The ARGV-elements have been permuted so that those that are not options now come last.) OPTSTRING is a string containing the legitimate option characters. If an option character is seen that is not listed in OPTSTRING, return '?' after printing an error message. If you set `opterr' to zero, the error message is suppressed but we still return '?'. If a char in OPTSTRING is followed by a colon, that means it wants an arg, so the following text in the same ARGV-element, or the text of the following ARGV-element, is returned in `optarg'. Two colons mean an option that wants an optional arg; if there is text in the current ARGV-element, it is returned in `optarg', otherwise `optarg' is set to zero. If OPTSTRING starts with `-' or `+', it requests different methods of handling the non-option ARGV-elements. See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. Long-named options begin with `--' instead of `-'. Their names may be abbreviated as long as the abbreviation is unique or is an exact match for some defined option. If they have an argument, it follows the option name in the same ARGV-element, separated from the option name by a `=', or else the in next ARGV-element. When `getopt' finds a long-named option, it returns 0 if that option's `flag' field is nonzero, the value of the option's `val' field if the `flag' field is zero. The elements of ARGV aren't really const, because we permute them. But we pretend they're const in the prototype to be compatible with other systems. LONGOPTS is a vector of `struct option' terminated by an element containing a name which is zero. LONGIND returns the index in LONGOPT of the long-named option found. It is only valid when a long-named option has been found by the most recent call. If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ int _getopt_internal (argc, argv, optstring, longopts, longind, long_only) int argc; char *const *argv; const char *optstring; const struct option *longopts; int *longind; int long_only; { int print_errors = opterr; if (optstring[0] == ':') print_errors = 0; optarg = NULL; if (optind == 0 || !__getopt_initialized) { if (optind == 0) optind = 1; /* Don't scan ARGV[0], the program name. */ optstring = _getopt_initialize (argc, argv, optstring); __getopt_initialized = 1; } /* Test whether ARGV[optind] points to a non-option argument. Either it does not have option syntax, or there is an environment flag from the shell indicating it is not an option. The later information is only used when the used in the GNU libc. */ #ifdef _LIBC # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ || (optind < nonoption_flags_len \ && __getopt_nonoption_flags[optind] == '1')) #else # define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') #endif if (nextchar == NULL || *nextchar == '\0') { /* Advance to the next ARGV-element. */ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been moved back by the user (who may also have changed the arguments). */ if (last_nonopt > optind) last_nonopt = optind; if (first_nonopt > optind) first_nonopt = optind; if (ordering == PERMUTE) { /* If we have just processed some options following some non-options, exchange them so that the options come first. */ if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (last_nonopt != optind) first_nonopt = optind; /* Skip any additional non-options and extend the range of non-options previously skipped. */ while (optind < argc && NONOPTION_P) optind++; last_nonopt = optind; } /* The special ARGV-element `--' means premature end of options. Skip it like a null option, then exchange with previous non-options as if it were an option, then skip everything else like a non-option. */ if (optind != argc && !strcmp (argv[optind], "--")) { optind++; if (first_nonopt != last_nonopt && last_nonopt != optind) exchange ((char **) argv); else if (first_nonopt == last_nonopt) first_nonopt = optind; last_nonopt = argc; optind = argc; } /* If we have done all the ARGV-elements, stop the scan and back over any non-options that we skipped and permuted. */ if (optind == argc) { /* Set the next-arg-index to point at the non-options that we previously skipped, so the caller will digest them. */ if (first_nonopt != last_nonopt) optind = first_nonopt; return -1; } /* If we have come to a non-option and did not permute it, either stop the scan or describe it to the caller and pass it by. */ if (NONOPTION_P) { if (ordering == REQUIRE_ORDER) return -1; optarg = argv[optind++]; return 1; } /* We have found another option-ARGV-element. Skip the initial punctuation. */ nextchar = (argv[optind] + 1 + (longopts != NULL && argv[optind][1] == '-')); } /* Decode the current option-ARGV-element. */ /* Check whether the ARGV-element is a long option. If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ if (longopts != NULL && (argv[optind][1] == '-' || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = -1; int option_index; for (nameend = nextchar; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `%s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; optopt = 0; return '?'; } if (pfound != NULL) { option_index = indfound; optind++; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) { if (argv[optind - 1][1] == '-') /* --option */ fprintf (stderr, _("%s: option `--%s' doesn't allow an argument\n"), argv[0], pfound->name); else /* +option or -option */ fprintf (stderr, _("%s: option `%c%s' doesn't allow an argument\n"), argv[0], argv[optind - 1][0], pfound->name); } nextchar += strlen (nextchar); optopt = pfound->val; return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); optopt = pfound->val; return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } /* Can't find it as a long option. If this is not getopt_long_only, or the option starts with '--' or is not a valid short option, then it's an error. Otherwise interpret it as a short option. */ if (!long_only || argv[optind][1] == '-' || my_index (optstring, *nextchar) == NULL) { if (print_errors) { if (argv[optind][1] == '-') /* --option */ fprintf (stderr, _("%s: unrecognized option `--%s'\n"), argv[0], nextchar); else /* +option or -option */ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), argv[0], argv[optind][0], nextchar); } nextchar = (char *) ""; optind++; optopt = 0; return '?'; } } /* Look at and handle the next short option-character. */ { char c = *nextchar++; char *temp = my_index (optstring, c); /* Increment `optind' when we start to process its last character. */ if (*nextchar == '\0') ++optind; if (temp == NULL || c == ':') { if (print_errors) { if (posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); else fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); } optopt = c; return '?'; } /* Convenience. Treat POSIX -W foo same as long option --foo */ if (temp[0] == 'W' && temp[1] == ';') { char *nameend; const struct option *p; const struct option *pfound = NULL; int exact = 0; int ambig = 0; int indfound = 0; int option_index; /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; return c; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; /* optarg is now the argument, see if it's in the table of longopts. */ for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) /* Do nothing. */ ; /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) { /* Exact match found. */ pfound = p; indfound = option_index; exact = 1; break; } else if (pfound == NULL) { /* First nonexact match found. */ pfound = p; indfound = option_index; } else /* Second or later nonexact match found. */ ambig = 1; } if (ambig && !exact) { if (print_errors) fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), argv[0], argv[optind]); nextchar += strlen (nextchar); optind++; return '?'; } if (pfound != NULL) { option_index = indfound; if (*nameend) { /* Don't test has_arg with >, because some C compilers don't allow it to be used on enums. */ if (pfound->has_arg) optarg = nameend + 1; else { if (print_errors) fprintf (stderr, _("\ %s: option `-W %s' doesn't allow an argument\n"), argv[0], pfound->name); nextchar += strlen (nextchar); return '?'; } } else if (pfound->has_arg == 1) { if (optind < argc) optarg = argv[optind++]; else { if (print_errors) fprintf (stderr, _("%s: option `%s' requires an argument\n"), argv[0], argv[optind - 1]); nextchar += strlen (nextchar); return optstring[0] == ':' ? ':' : '?'; } } nextchar += strlen (nextchar); if (longind != NULL) *longind = option_index; if (pfound->flag) { *(pfound->flag) = pfound->val; return 0; } return pfound->val; } nextchar = NULL; return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { if (temp[2] == ':') { /* This is an option that accepts an argument optionally. */ if (*nextchar != '\0') { optarg = nextchar; optind++; } else optarg = NULL; nextchar = NULL; } else { /* This is an option that requires an argument. */ if (*nextchar != '\0') { optarg = nextchar; /* If we end this ARGV-element by taking the rest as an arg, we must advance to the next element now. */ optind++; } else if (optind == argc) { if (print_errors) { /* 1003.2 specifies the format of this message. */ fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], c); } optopt = c; if (optstring[0] == ':') c = ':'; else c = '?'; } else /* We already incremented `optind' once; increment it again when taking next ARGV-elt as argument. */ optarg = argv[optind++]; nextchar = NULL; } } return c; } } #ifndef HAVE_GETOPT int getopt (argc, argv, optstring) int argc; char *const *argv; const char *optstring; { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, (int *) 0, 0); } #endif #endif /* Not ELIDE_CODE. */ #ifdef TEST /* Compile with -DTEST to make an executable for use in testing the above definition of `getopt'. */ int main (argc, argv) int argc; char **argv; { int c; int digit_optind = 0; while (1) { int this_option_optind = optind ? optind : 1; c = getopt (argc, argv, "abc:d:0123456789"); if (c == -1) break; switch (c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': if (digit_optind != 0 && digit_optind != this_option_optind) printf ("digits occur in two different argv-elements.\n"); digit_optind = this_option_optind; printf ("option %c\n", c); break; case 'a': printf ("option a\n"); break; case 'b': printf ("option b\n"); break; case 'c': printf ("option c with value `%s'\n", optarg); break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } if (optind < argc) { printf ("non-option ARGV-elements: "); while (optind < argc) printf ("%s ", argv[optind++]); printf ("\n"); } exit (0); } #endif /* TEST */ wdq2wav-1.0.0/Makefile0000644000175000017500000000071010670641542013560 0ustar kevinkevinbase := wdq2wav all: compile clean: @rm -f $(base) $(base).o $(base).exe *.~[0-9]~ compile: wdq2wav debug: g++ -Wall -g -I. $(base).cpp -o $(base) wdq2wav.html: wdq2wav.1 groff -man -Thtml wdq2wav.1 > wdq2wav.html wdq2wav: wdq2wav.cpp wdq2wav.h g++ -Wall -DLINUX -O2 -I. $(base).cpp -o $(base) install: compile install -m 0755 -o root -g root wdq2wav $(DESTDIR)/usr/bin install -m 0644 -o root -g root wdq2wav.1 $(DESTDIR)/usr/share/man/man1 wdq2wav-1.0.0/wdq2wav.10000644000175000017500000000166510667175526013621 0ustar kevinkevin.\" Hey, EMACS: -*- nroff -*- .TH WDQ2WAV 1 "March 5, 2003" .SH NAME wdq2wav \- convert a WinDAQ file channel to a wav file .SH SYNOPSIS .B wdq2wav [OPTIONS] windaq-file channel-number wav-file .SH DESCRIPTION .B wdq2wav extracts a channel from a WinDAQ file and produces a .wav file. If the command line parameters of the windaq-file, channel-number, and wav-file are not given, then the program will prompt the user to enter those values when the program is run. .SH OPTIONS .TP .B \-p Play channel through audio system .TP .B \-m Do not demean. (Don't subtract the mean of the samples from each sample.) .TP .B \-z Scale the .wav file output .B *without* preservation of the zero value .TP .B \-v Verbose mode .TP .B \-q Quiet mode .TP .B \-h Show summary of options. .TP .B \-r Show version of program. .SH AUTHOR wdq2wav and this manual page were written by Kevin M. Rosenberg . wdq2wav-1.0.0/wdq2wav0000755000175000017500000014633612224077773013466 0ustar kevinkevinELF>@@P@8@@@@@@@@@@KK ``H  ` `@@DDPtd@@44Qtd/lib64/ld-linux-x86-64.so.2GNU GNUur.5878e\   0 8:>r%m Cmr:$ۍY@P v0N?(EL2 CpI?yIkzt  .G3 O ~EfKiWi ^2sp` `! `5!` " @ ` |!`P!@` " @h-@``C`M!`" p@p@libstdc++.so.6__gmon_start___Jv_RegisterClasses_ITM_deregisterTMCloneTable_ITM_registerTMCloneTable__pthread_key_create_ZNSs4_Rep10_M_destroyERKSaIcE_Znam_ZNKSt5ctypeIcE13_M_widen_initEv_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEED0Ev_ZNSo9_M_insertImEERSoT__ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEED1Ev_ZNSs4_Rep10_M_disposeERKSaIcE_ZNSo5flushEv_ZSt16__throw_bad_castv_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l_ZSt19__throw_logic_errorPKc_ZTTSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE_ZNSt8ios_base4InitD1Ev_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E_ZNSt6localeD1Ev_ZNSsC1EPKcRKSaIcE_ZNSt8ios_baseC2Ev_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate_ZNSs6assignEPKc_ZSt3cin_ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag_ZNSs6assignEPKcm_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev_ZNSs4_Rep20_S_empty_rep_storageE_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv__gxx_personality_v0_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE_ZSt4cout_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ZNSolsEi_ZNSolsEs_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc_ZNSs4_Rep9_S_createEmmRKSaIcE_ZNSi7getlineEPcl_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ZNSo9_M_insertIdEERSoT__ZNSt8ios_baseD2Ev_ZNSs6assignERKSs_ZNSo3putEc_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE_ZSt4cerr_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode_ZNSt8ios_base4InitC1Ev_ZNSt6localeC1Ev_ZdlPv_ZTVSt9basic_iosIcSt11char_traitsIcEElibm.so.6libgcc_s.so.1_Unwind_Resumelibc.so.6optindstrrchrstrncpygmtimestrtolstrlen__cxa_atexitreadasctimegetoptlseekmemcpyioctlcloseopenstrchr__libc_start_mainwriteGCC_3.0GLIBC_2.14GLIBC_2.2.5CXXABI_1.3GLIBCXX_3.4.9GLIBCXX_3.4.11GLIBCXX_3.4e P&y 0ui )ӯk5)@aNt)] ``8 `:`;`> `9@`?``B`C`D `=@`H`P`X```h`p`x`` ` ` ` `````Ȣ`Т`آ``A``````` `(` 0`!8`"@`#H`$P`%X`&``'h`)p`*x`+`,`-`.`/`0`F`1`2`3ȣ`4У`5أ`6`7HH HtH5 % @% h% h% h% h%ډ h%҉ h%ʉ h%‰ hp% h`% h P% h @% h 0% h % h % h% h%z h%r h%j h%b h%Z h%R h%J h%B hp%: h`%2 hP%* h@%" h0% h %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HH$HHHx-PJHHlI~H'HEH$LI~XHDŽ$`^:HPJHHH6HH$H$Hx蘚dH\HHD$HxHEH$LH|$HDŽ$h`HX̛HHH$H$Hx&zPJHH{I%HEH$LLH{XHDŽ$(`HVH޹HWHt&H$rPJHHLI}HHEH$pLpI}XHDŽ$`ΚHPJHVHHHH$pH$PHxH$LHxHL$pHH$H$HxƘ"HWHt]H$gHH$H$HxvH$Ht$YHx`HPJH 밋PJHPJHtPJHPJHPJHzPJHfSHHHGHH0`HxH `uH{8H` H[ùHWHtHt$WŋPJHSHHHGHH0`HxH `uH{8H`谙H(H[ùHWHtHt$ߗ뽋PJHATH9USHtlHtwH)I1LOIHHHu2EH `uZ[]HA\11E1HHHHLH"HD[8`]HA\Ht@)ELeB!Hl$Ld$H-o L%X H\$Ll$Lt$L|$H8L)AIHI11Ht@LLDAHH9uH\$Hl$Ld$Ll$ Lt$(L|$0H8HH usage: OPTIONS -q Supress all messages -v Verbose mode -d Debug mode Unable to open fileChannel offset: Channel header bytes: Header bytes: Data bytes: High resolution: YesNoError opening output file Error writing fileError closing output file Wav data_scale: , data_offset: Error opening /dev/dspError setting DSP formatDSP Format not setNumber of channels not setError setting sample rateWarning: Sample rate set to , not Error writing audio samplesError reading fileError reading file at is invalid, valid range 1-LegacyNon-legacyError reading file File: Format: Time File Creation: Time File Written: Samples: , Channels: , Sample Rate: , Units: , Minimum: (), Maximum: )Mean: (removing) (not removing) Scaled minimum: , maximum: Slope , Intercept rqvzmndphToo many parameters Enter input WinDAQ filename: Enter channel number: Error: Channel is not an integerEnter output wav filename: [OPTIONS] -p Play channel through audio system -z Scale output without preserving zero point -m Do not demean the data (don't subtract the mean value from each sample) -n Dry run (do not create any output -h Print this help message Incorrect signagure: file is not a valid WinDAQ filebasic_string::_S_construct null not validError setting number of channelsFile contains 'packed' channels.Convert to 'Advanced CODAS headers' before processing with wdq2wav.Error reading data from channelError extracting wav from channelD@_@_@_@(@_@_@_@_@@@_@@@_@_@_@_@@_@_@_@@??@@@;4%HP00Ppp@P8h 00PP8hТ0PP0H`@`zRx *zRx $`FJ w?;*3$"D@AS$\hAG l AA $pAG t AA ؒDI K XDI K ؓ>DV F H4 gAFG q DAD H DAK 4D0RBED A(D0x(D ABB|X P2A ] zPLRx@ ,$PeD@AAK0x AAA ,TP@AAG0r AAA 4@3AL bC4T`cBFD F0V  AABD <]BAD F0R  CABK h AAB3AL bCT<ؖ^@BFA A(J (A ABBI Z (C ABBF ,D@^AG @ AG LA4tpAADF g AAD DCA$_AG c AA ,$x@AAG0j AAK 08 404LBDA w AEA t FED D@BAA J_  CABE ^  CABD Lxݓ@BBB A(G0N 0A(A BBBF tlȨ,@BIB A(I0GU 0A(A BBBE ~ 0C(A BBBH  0C(A BBBE LPz@BOB B(A0A8Gk 8C0A(B BBBK T4Ȕ@BBB E(D0A8J 8A0A(B BBBK T5@BBB E(A0A8G  8D0A(B BBBB L&@BBB E(A0C8Jp 8A0A(B BBBA &D]$Jf@X$<H`    @lT-S &  K5   8        J  5    a    J@           G0,9^aaUaSST^ST$a R Q R ^ R \ )\jiieddeUffe&eegehg$g]\^[ZTZ \ [!["g#e$d%\&^(g)f*h,i,h,X->h./^/S/R0R0R1Z2Y2YY4V4V4W5^6\6b6]6b6e7a7e7a7j8j8^8i8j8V9S9^9Z9^;b<b<6b=c=c>d?d@cA:bBhB`B_CbD^DaE%aEYE^FSGRG#ZGhGcGcH]H^HgIeIeI\IjJ]J\JeKeKiKZKVKhLcQWY!{+8`@@@@[e @ $@``o`@p @@ i (`@@ oh@oo@ `F@V@f@v@@@@@@@@@@@&@6@F@V@f@v@@@@@@@@@@@&@6@F@V@f@v@@@@@@@@@@@&@6@F@V@f@v@@GCC: (Debian 4.8.1-10) 4.8.1GCC: (Debian 4.7.3-7) 4.7.3.symtab.strtab.shstrtab.interp.note.ABI-tag.note.gnu.build-id.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.dyn.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.gcc_except_table.init_array.fini_array.jcr.dynamic.got.got.plt.data.bss.comment@#@ 1<@<$Do`@`hN @Vp @p i^o@koh@hz@@ @0@0`@g$@$ 0@0p@4؋@؋lD@D``` `  ` (`(` `H 09181 H@@<@`@@p @@h@ @ @ @ 0@ @$@0@@؋@D@``` ` `(```  @L @&cG`r}` @ @ @@@`` `@ `r)@@7`C(`Y`j`} ` ``C` @ @! `C!` v!`P #@ 0#@e ) !@g=" @hr %@3   0 @= ?@e @-@$@ P3@ `4" @t %@ @,@_4!@` w" @hB` ,@@ P0@_ !@2k @>`` ` `-@ 1 `K@5DYE`c`o #@ +@A``   @% C A`Q  !@ d F`l   .@  G  @W  0%@]g `s   p-@    9@" A  !@RV k  ,@{    $@c  $@3 - H`2 w  !`  D`   +@^C  ` r  " p@p ` @m 0#@e F@  P3@>P F@t @,@_ @ @wdq2wav.cpp_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc.part.6_GLOBAL__sub_I_g_quiet_ZStL8__ioinitcrtstuff.c__JCR_LIST__deregister_tm_clonesregister_tm_clones__do_global_dtors_auxcompleted.6392__do_global_dtors_aux_fini_array_entryframe_dummy__frame_dummy_init_array_entry__FRAME_END____JCR_END___GLOBAL_OFFSET_TABLE___init_array_end__init_array_start_DYNAMICdata_start_ZSt3cin@@GLIBCXX_3.4g_dry_run_ZNSolsEi@@GLIBCXX_3.4__libc_csu_fini_start_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4_ZSt16__throw_bad_castv@@GLIBCXX_3.4_ZTVSt9basic_iosIcSt11char_traitsIcEE@@GLIBCXX_3.4close@@GLIBC_2.2.5_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4_ZN10WindaqFileD1Ev_ZN10WindaqFileC2EPKcioctl@@GLIBC_2.2.5_ZNSt8ios_baseC2Ev@@GLIBCXX_3.4_Z12fileBasenamePKc_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEED2Evasctime@@GLIBC_2.2.5_ZNSs6assignEPKc@@GLIBCXX_3.4_Z11read_float8iRd__gmon_start___Jv_RegisterClasses_Znam@@GLIBCXX_3.4_Z8info_msgPKc_ZdlPv@@GLIBCXX_3.4_ZNSs4_Rep10_M_disposeERKSaIcE@@GLIBCXX_3.4_ZN13WindaqChannel17read_channel_dataEv_ZNKSt5ctypeIcE13_M_widen_initEv@@GLIBCXX_3.4.11_Z8put_int4Pcj_fini_ZN7WavFileC2ER13WindaqChannelPKc_ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4getopt@@GLIBC_2.2.5_ZSt4cerr@@GLIBCXX_3.4_ZNSolsEs@@GLIBCXX_3.4_ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tagread@@GLIBC_2.2.5__libc_start_main@@GLIBC_2.2.5_ZN10WindaqFile10ReadHeaderEv_ZN13WindaqChannelD2Ev_ZNSs4_Rep9_S_createEmmRKSaIcE@@GLIBCXX_3.4gmtime@@GLIBC_2.2.5__cxa_atexit@@GLIBC_2.2.5_ZTTSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE@@GLIBCXX_3.4_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEED1Evg_ignore_zero_ZN7WavFileD2Ev_ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4_ITM_deregisterTMCloneTable_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@@GLIBCXX_3.4_IO_stdin_used_Z5usagePKc_Z21info_msg_sans_newlinePKcstrlen@@GLIBC_2.2.5optind@@GLIBC_2.2.5_ITM_registerTMCloneTable__data_start_ZNSs4_Rep10_M_destroyERKSaIcE@@GLIBCXX_3.4_Z8put_int2Pct_ZNSi7getlineEPcl@@GLIBCXX_3.4_Z7wdq2wavPKciS0_bstrrchr@@GLIBC_2.2.5g_verbose__TMC_END___ZNSsC1EPKcRKSaIcE@@GLIBCXX_3.4_ZN10WindaqFileD2Ev_ZN10WindaqFile19any_packed_channelsEv_ZSt4cout@@GLIBCXX_3.4__dso_handlelseek@@GLIBC_2.2.5strtol@@GLIBC_2.2.5__libc_csu_init_ZNSt6localeC1Ev@@GLIBCXX_3.4g_dont_demean_Z12str_wrm_tailPcg_quiet_ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l@@GLIBCXX_3.4.9_ZN7WavFile9WriteFileEvstrchr@@GLIBC_2.2.5_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E@@GLIBCXX_3.4_Z9error_msgPKc_Z9read_int4iRj__bss_start_ZNSo5flushEv@@GLIBCXX_3.4_ZN7WavFile11fill_headerEv_ZNSt8ios_baseD2Ev@@GLIBCXX_3.4_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev@@GLIBCXX_3.4_ZN7WavFile4PlayEv_ZNSs6assignEPKcm@@GLIBCXX_3.4_Z11str_rm_tailPcPKc__pthread_key_create_ZN7WavFileD1Ev_ZNSs6assignERKSs@@GLIBCXX_3.4_ZSt19__throw_logic_errorPKc@@GLIBCXX_3.4_Z9read_int2iRt_Z9read_int1iRh_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate@@GLIBCXX_3.4_end_ZNKSt15basic_stringbufIcSt11char_traitsIcESaIcEE3strEv@@GLIBCXX_3.4strncpy@@GLIBC_2.2.5_ZTVSt15basic_streambufIcSt11char_traitsIcEE@@GLIBCXX_3.4_ZNSo9_M_insertImEERSoT_@@GLIBCXX_3.4.9g_debug_ZNSo9_M_insertIdEERSoT_@@GLIBCXX_3.4.9_ZN10WindaqFile17is_channel_packedEi_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@@GLIBCXX_3.4_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEED0Ev_edata__gxx_personality_v0@@CXXABI_1.3_ZNSt19basic_ostringstreamIcSt11char_traitsIcESaIcEEC1ESt13_Ios_Openmode@@GLIBCXX_3.4write@@GLIBC_2.2.5_Unwind_Resume@@GCC_3.0_ZNSt6localeD1Ev@@GLIBCXX_3.4_ZN10WindaqFileC1EPKc_ZNSo3putEc@@GLIBCXX_3.4_ZN13WindaqChannelC1ER10WindaqFileimemcpy@@GLIBC_2.14_ZN7WavFileC1ER13WindaqChannelPKcopen@@GLIBC_2.2.5_ZN13WindaqChannelC2ER10WindaqFilei_ZN13WindaqChannelD1Evmain_initwdq2wav-1.0.0/wdq2wav.html0000644000175000017500000000664610667175526014431 0ustar kevinkevin WDQ2WAV

WDQ2WAV

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
AUTHOR

NAME

wdq2wav − convert a WinDAQ file channel to a wav file

SYNOPSIS

wdq2wav [OPTIONS] windaq-file channel-number wav-file

DESCRIPTION

wdq2wav extracts a channel from a WinDAQ file and produces a .wav file.

If the command line parameters of the windaq-file, channel-number, and wav-file are not given, then the program will prompt the user to enter thos values when the program is run.

OPTIONS

−p

Play channel through audio system

−m

Do not demean. (Don’t subtract the mean of the samples from each sample.)

−z

Scale the .wav file output *without* preservation of the zero value

−v

Verbose mode

−q

Quiet mode

−h

Show summary of options.

−r

Show version of program.

AUTHOR

This manual page was written by Kevin M. Rosenberg <kevin@rosenberg.net>.