* Allow building on Win32 with MinGW

This commit is contained in:
Chris Cannam
2007-11-28 11:50:47 +00:00
parent 09dadc239a
commit b3c4ce045f
12 changed files with 358 additions and 24 deletions

View File

@@ -19,6 +19,7 @@
#include <cmath>
#include <sys/time.h>
#include <time.h>
#include "sysutils.h"
#include <getopt.h>
@@ -28,6 +29,11 @@
using namespace std;
using namespace RubberBand;
#ifdef _WIN32
using RubberBand::gettimeofday;
using RubberBand::usleep;
#endif
int main(int argc, char **argv)
{
int c;
@@ -251,7 +257,10 @@ int main(int argc, char **argv)
frequencyshift *= pow(2.0, pitchshift / 12);
}
struct timeval tv;
#ifdef _WIN32
RubberBand::
#endif
timeval tv;
(void)gettimeofday(&tv, 0);
RubberBandStretcher::setDefaultDebugLevel(debug);
@@ -446,7 +455,10 @@ int main(int argc, char **argv)
cerr << "input peak: " << inpeak << "; output peak " << outpeak << "; gain " << (inpeak > 0 ? outpeak/inpeak : 1) << endl;
cerr << "input rms: " << inmean << "; output rms " << outmean << "; gain " << (inmean > 0 ? outmean/inmean : 1) << endl;
struct timeval etv;
#ifdef _WIN32
RubberBand::
#endif
timeval etv;
(void)gettimeofday(&etv, 0);
etv.tv_sec -= tv.tv_sec;