include/ALObj.h

00001 
00026 #ifndef _ALOBJ_
00027 #define _ALOBJ_
00028 
00029 #include <Framework.h>
00030 #include <disableWarnings.h>
00031 #include<Windows.h>
00032 #include<stdio.h>
00033 #include<io.h>
00034 /* file control options - not sure if it's needed */
00035 #include<fcntl.h>
00036 /* console input output (old) - needed? */
00037 #include<conio.h>
00038 #include<al.h>
00039 #include<alc.h>
00040 #include<efx.h>
00041 #include<efx-creative.h>
00042 #include<xram.h>
00043 
00044 namespace sonus
00045 {
00060         class ALObj
00061         {
00062                 public:
00063 
00064                         ALuint          source;
00065                         ALuint          filter;
00066                         
00075                         ALObj( ALuint fileCount, const char* fileNames[], bool looping );
00076                         
00081                         ~ALObj();
00082 
00088                         bool            getMute();
00089 
00095                         ALfloat*        getPosition();
00096 
00102                         ALfloat*        getVolume();
00103 
00104 
00112                         void            setPosition( ALfloat x, ALfloat y, ALfloat z );
00113 
00121                         void            setVelocity( ALfloat x, ALfloat y, ALfloat z );
00122 
00129                         void            setDistances( ALfloat max, ALfloat ref );
00130 
00136                         void            setDistanceMax( ALfloat max );
00137 
00143                         void            setDistanceRef( ALfloat ref );
00144 
00150                         void            setMute( ALboolean mute );
00151 
00157                         void            setVolume( ALfloat volume );
00158 
00159 
00163                         void            createLowPassFilter();
00164 
00171                         void            setLowPassFilter( ALfloat gain, ALfloat gainHF );
00172 
00173 
00177                         void            deleteFilters();
00178 
00182                         void            deleteBuffers();
00183 
00187                         void            deleteSource();
00188 
00189 
00193                         void            play();
00194 
00200                         void            play( ALuint uiBufferID );
00201                         
00205                         void            stop();
00206 
00207                 private:
00208 
00209                         ALuint*         buffer;
00210                         int                     bufferCount;
00211                         ALenum          format;
00212                         ALsizei         size;
00213                         ALvoid*         data;
00214                         ALsizei         freq;
00215                         ALboolean       playing;
00216                         ALboolean       looping;
00217                         ALboolean       mute;
00218                         ALfloat         sourcePosition[ 3 ];
00219                         ALfloat*        sourceVolume;
00220 
00221                         char            result[ 1000 ];
00222 
00223         };
00224 
00225 }
00226 
00227 #endif

Generated on Tue Aug 26 12:26:54 2008 for sonus by  doxygen 1.5.4