**
** Copyright (c) 2003 Kevin Rosenberg
**
-** $Id: wdq2wav.cpp,v 1.8 2003/01/21 07:37:13 kevin Exp $
+** $Id: wdq2wav.cpp,v 1.9 2003/01/21 09:38:59 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
{0, 0, 0, 0}
};
-static const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.8 2003/01/21 07:37:13 kevin Exp $";
+static const char* g_szIdStr = "$Id: wdq2wav.cpp,v 1.9 2003/01/21 09:38:59 kevin Exp $";
static bool g_quiet = false;
static bool g_verbose = false;
static bool g_debug = false;
-#define MAX_INPUT_STR 256
-
void
error_msg (const char *msg)
{
std::cout << " --help Print this help message\n";
}
-bool wdq2wav (const char* wdq_fname, const int channel, const char *wav_fname);
int
main (int argc, char *argv[])
unsigned int tmp4;
m_valid = false;
- if ((m_fd = open (m_strFile.c_str(), O_RDONLY)) == 0) {
+ if ((m_fd = open (m_strFile.c_str(), O_RDONLY)) < 0) {
m_error = "Unable to open file";
return false;
}
lseek (0, 0, SEEK_SET);
if (read (m_fd, &tmp2, sizeof(tmp2)) != sizeof(tmp2)) {
- m_error = "Unable to read beginning of file";
return false;
}
m_nChannels = tmp2 & 0x1f;
**
** Copyright (c) 2003 Kevin Rosenberg
**
-** $Id: wdq2wav.h,v 1.5 2003/01/21 07:37:13 kevin Exp $
+** $Id: wdq2wav.h,v 1.6 2003/01/21 09:38:59 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
#include <unistd.h>
#include <getopt.h>
+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);
+
class WindaqFile
{
public: