windowsstuff.h

Go to the documentation of this file.
00001 
00024 #ifndef WINDOWSSTUFF_H_INCLUDED
00025 #define WINDOWSSTUFF_H_INCLUDED
00026 #ifndef WIN32
00027   
00028 #include <unistd.h>
00029 
00030 #else // WIN32
00031 
00032 //C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
00033 #pragma warning( disable : 4290 )
00034 #include "openalpp/export.h"
00035 
00036 #include <windows.h>
00037 
00038 inline void usleep( int x ) { Sleep( x /1000 ); };
00039 
00040 #include <AL/alut.h>
00041 
00042 #define alGetSourceiv alGetSourcei
00043 inline OPENALPP_API ALboolean alutLoadWAV(const char *fname,ALvoid **buffer,ALint *format,
00044                              ALsizei *size,ALsizei *bits,ALsizei *freq) {
00045   ALboolean loop;
00046   alutLoadWAVFile(const_cast<char *>(fname),format,buffer,size,freq,&loop);
00047   if(*format==AL_FORMAT_STEREO16 || *format==AL_FORMAT_MONO16)
00048     *bits=16;
00049   else
00050     *bits=8;
00051   return AL_TRUE;
00052 }
00053 
00054 // This should take care of VC++ strange way of handling loop variables...
00055 //#define for if(0); else for
00056 
00057 #endif
00058 #else
00059 #endif

Generated on Thu May 18 00:49:37 2006 for openalpp by  doxygen 1.4.6