/**************************************************************************** FILE: audioenv.h DESCRIPTION: header for audio environment class ****************************************************************************/ #if !defined (AUDIOENV) #define AUDIOENV /** *@author Krippel Harald */ #include #include //#ifdef Q_OS_LINUX #if defined(Q_OS_LINUX) || defined(Q_OS_GLIBC) #define LINUX #include #include #endif #ifdef Q_OS_MACX #define MACOS #import #import #include //#include // #include #endif #ifdef Q_OS_WIN32 #define WINDOWS #include #include #endif #define ALBUFFERSIZE 1024*16 class AudioEnv : public QObject { // Q_OBJECT public: static AudioEnv *theInstance(QObject *parent=0); AudioEnv (QObject *parent=0); ~AudioEnv (); void Init (); void ListenerPosition (float c[4][4] ); void UpdateObstruction (int); int LoadFile (const char *, bool); void SetSourcePosition (int, float *); void SetSourceVelocity (int, float *); void SetSourceGain (int handle, float gain); void Play (int); void Stop (int); void Loop(int , int); void Relative(int , int); int IsPlaying(int); int IncrementEnv(); private: ALuint buffer[ALBUFFERSIZE]; ALuint source[ALBUFFERSIZE]; ALuint nextBuffer, nextSource; unsigned int EAXlevel; static AudioEnv *theInstancePtr; }; #endif // AUDIOENV