X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=wdq2wav.cpp;h=23e764bef1631d44f33b03372ab6c449c4bdc0fc;hb=5e419a4aef9c25e87eebb3f032a32411efdcdaa2;hp=c1dc1177c43ac8ada36012e4bc7dc86d9f2acbc5;hpb=3389e0fe586ac6fb119c65535121b3ef5193bba9;p=wdq2wav.git diff --git a/wdq2wav.cpp b/wdq2wav.cpp index c1dc117..23e764b 100644 --- a/wdq2wav.cpp +++ b/wdq2wav.cpp @@ -8,8 +8,6 @@ ** ** 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. @@ -469,7 +467,7 @@ WindaqFile::ReadHeader () if (m_bLegacy_format) m_sample_rate = (double) m_sr_numer / (double) (m_sr_denom * m_nChannels); else - m_sample_rate = (double) m_nChannels / m_time_between_channel_samples; + 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)) @@ -808,10 +806,10 @@ WavFile::WriteFile () return true; } -#ifdef WIN32 +#ifdef _WIN32 #include #include -#elif defined(LINUX) +#elif defined(__linux__) #include #include #endif @@ -819,10 +817,10 @@ WavFile::WriteFile () 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");