**
** 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.
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
+#include <stdlib.h>
#include <wdq2wav.h>
const char* g_szIdStr = "$Id$";
void
error_msg (const char *msg)
{
- std::cerr << msg << "\n";
+ std::cerr << msg << std::endl;
}
void
info_msg (const char* msg)
{
- std::cout << msg << "\n";
+ std::cout << msg << std::endl;
}
void
return true;
}
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#include <mmsystem.h>
-#elif defined(LINUX)
+#elif defined(__linux__)
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#endif
bool
WavFile::Play ()
{
-#ifdef WIN32
+#ifdef _WIN32
if (PlaySound ((LPCSTR) m_data, 0, SND_MEMORY | SND_NODEFAULT))
return true;
-#elif defined(LINUX)
+#elif defined(__linux__)
int fd;
if ((fd = open ("/dev/dsp",O_WRONLY)) == -1) {
error_msg ("Error opening /dev/dsp");