00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef VRS_SOUND_SOUNDSTREAMAL_H
00019 #define VRS_SOUND_SOUNDSTREAMAL_H
00020
00021
00022
00023
00024 #include <vrs/polyattribute.h>
00025
00026
00027
00028
00029 #include <vrs/openal/config.h>
00030 #include <vrs/openal/sourceal.h>
00031
00032
00033 namespace VRS
00034 {
00035 namespace SOUND
00036 {
00037 class VRS_OPENAL_API SoundStreamAL : public PolyAttribute
00038 {
00039 public:
00040
00041 SoundStreamAL(const std::string fileName,
00042 const SO<SourceAL>& source = 0,
00043 unsigned int bufferSize = 32768,
00044 bool loopMode = false,
00045 bool enabled = true);
00046
00047 virtual ~SoundStreamAL(void);
00048
00049 virtual bool create(void) = 0;
00050
00051 virtual bool update(void) = 0;
00052
00053 virtual void release(void) = 0;
00054
00055
00056 void setFileName(const std::string fileName);
00057 inline const std::string& getFileName(void) const
00058 {
00059 return this->fileName_;
00060 }
00061
00062 void setSource(const SO<SourceAL>& source);
00063 inline const SO<SourceAL>& getSource(void) const
00064 {
00065 return this->source_;
00066 }
00067
00068 void setBufferSize(unsigned int bufferSize);
00069 inline unsigned int getBufferSize(void) const
00070 {
00071 return this->bufferSize_;
00072 }
00073
00074 void setLoopMode(bool loopMode);
00075 inline bool getLoopMode(void) const
00076 {
00077 return this->loopMode_;
00078 }
00079
00080 VRS_TYPEINFO(SoundStreamAL, PolyAttribute);
00081 VRS_SERIALIZABLE_ABSTRACT_CLASS(SoundStreamAL);
00082
00083 protected:
00084
00085 SoundStreamAL(void);
00086
00087 private:
00088
00089 std::string fileName_;
00090 SO<SourceAL> source_;
00091 unsigned int bufferSize_;
00092 bool loopMode_;
00093
00094 };
00095
00096 };
00097
00098 };
00099
00100 #endif //VRS_SOUND_SOUNDSTREAMAL_H
00101