#include <stdio.h>
-#ifdef __MINGW32__
-// This is broken, but allows the file to compile without a POSIX
-// environment.
-static unsigned int sleep(unsigned int secs) { return 0; }
+#ifdef _WIN32
+#include <windows.h>
+#define sleep(x) Sleep(x*1000)
#else
#include <unistd.h> // sleep()
#endif
# define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
# include <OpenAL/al.h>
# include <OpenAL/alc.h>
-# include <OpenAL/alut.h>
+# include <ALUT/alut.h>
#elif defined(OPENALSDK)
# include <al.h>
# include <alc.h>
ALfloat source_vel[3];
// configuration values
-// ALenum format;
-// ALsizei size;
-// ALvoid* data;
-// ALsizei freq;
ALboolean loop = false;
source_pos[0] = 0.0; source_pos[1] = 0.0; source_pos[2] = 0.0;
}
#else
+ ALenum format;
+ ALsizei size;
+ ALvoid* data;
+ ALsizei freq;
+
# if defined (__APPLE__)
alutLoadWAVFile( (ALbyte *)AUDIOFILE, &format, &data, &size, &freq );
# else