00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #include "audiocore.h"
00011 #include "AudioException.h"
00012 #include "math/vector3.h"
00013
00014 namespace MMAudio {
00015 class StreamImpl;
00018
00022 class Source {
00023 friend class StreamImpl;
00024
00025 ALuint name;
00026 public:
00028 Source() ;
00029 ~Source() ;
00030
00032 float getGain() const ;
00034 void setGain(float) ;
00035
00037 float getRolloff() const ;
00039 void setRolloff(float) ;
00040
00042 Vector3 getPosition() const ;
00044 void setPosition(Vector3) ;
00045
00047 Vector3 getVelocity() const ;
00049 void setVelocity(Vector3) ;
00050
00056 void playSound(unsigned int sname) ;
00061 void loopSound(unsigned int sname) ;
00065 void stop() ;
00066
00067 private:
00068
00069 bool isSourceRelative() const ;
00070 void setSourceRelative(bool) ;
00071
00072 bool isLooping() const ;
00073 void setLooping(bool) ;
00074
00075 void setSong(unsigned int sname) ;
00076
00077 void play() ;
00078 void pause() ;
00079 void rewind() ;
00080
00081 void queueBuffer(ALuint) ;
00082 ALuint unqueueBuffer() ;
00083
00084 int getState() const ;
00085 int getQueuedBufferCount() const ;
00086 int getProcessedBufferCount() const ;
00087
00088 ALuint getName() const { return name; }
00089
00090 Source(const Source&);
00091 Source& operator=(const Source&);
00092 };
00094 }
00095