Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

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 #define usleep(x) Sleep((x)/1000)
00038 
00039 #include <AL/alut.h>
00040 
00041 #define alGetSourceiv alGetSourcei
00042 inline OPENALPP_API ALboolean alutLoadWAV(const char *fname,ALvoid **buffer,ALint *format,
00043                              ALsizei *size,ALsizei *bits,ALsizei *freq) {
00044   ALboolean loop;
00045   alutLoadWAVFile(const_cast<char *>(fname),format,buffer,size,freq,&loop);
00046   if(*format==AL_FORMAT_STEREO16 || *format==AL_FORMAT_MONO16)
00047     *bits=16;
00048   else
00049     *bits=8;
00050   return AL_TRUE;
00051 }
00052 
00053 // This should take care of VC++ strange way of handling loop variables...
00054 //#define for if(0); else for
00055 
00056 #endif
00057 #else
00058 #endif

Generated on Thu Dec 9 14:08:12 2004 for openalpp by  doxygen 1.3.9.1