00001
00024 #ifndef AUDIOBASE_H_INCLUDED_C41996D8
00025 #define AUDIOBASE_H_INCLUDED_C41996D8
00026
00027 #include "openalpp/export.h"
00028 #include <cstdlib>
00029 extern "C" {
00030 #include <AL/al.h>
00031 #include <AL/alut.h>
00032 #include <AL/alc.h>
00033 }
00034 #include "openalpp/windowsstuff.h"
00035 #include "openalpp/error.h"
00036 #include "openalpp/referenced.h"
00037 #include "openalpp/ref_ptr.h"
00056 namespace openalpp {
00057
00061 typedef enum SampleFormat {Mono8,Stereo8,Mono16,Stereo16};
00062
00067 class OPENALPP_API AudioBase : public Referenced{
00072 static int instances_;
00073
00077 static ALCdevice *device_;
00078
00082 #ifndef WIN32
00083 static void *context_;
00084 #else
00085 static struct ALCcontext_struct *context_;
00086 #endif
00087 protected:
00095 AudioBase(int frequency=-1,int refresh=-1,int synchronous=-1)
00096 throw (InitError);
00097
00101 virtual ~AudioBase();
00102
00107 static bool reverbinitiated_;
00108
00115 static void (*alReverbScale)(ALuint sid, ALfloat param);
00116
00123 static void (*alReverbDelay)(ALuint sid, ALfloat param);
00124 };
00125
00126 }
00127
00128 #endif