filestreamupdater.h

Go to the documentation of this file.
00001 
00024 #ifndef FILESTREAMUPDATER_H_INCLUDED
00025 #define FILESTREAMUPDATER_H_INCLUDED
00026 #include "openalpp/streamupdater.h"
00027 #include "stdlib.h"
00028 #include <vorbis/codec.h>
00029 #include <vorbis/vorbisfile.h>
00030 #include "openalpp/export.h"
00031 
00032 
00033 
00034 namespace openalpp {
00035 
00039     class OPENALPP_API FileStreamUpdater : public StreamUpdater 
00040     {
00041         OggVorbis_File *oggfile_; // The file structure
00042         const unsigned int buffersize_; // Size of the buffer in bytes
00043         ALshort *buffer;
00044         bool seekPending; // true if seek is waiting to be performed in update
00045         float seekTime; // time in seconds to seek to
00046         bool looping_;            // Are we looping or not?
00047 
00051         void seekNow(float time_s);
00052 
00053     public:
00063         FileStreamUpdater(OggVorbis_File *oggfile,
00064             const ALuint buffer1,ALuint buffer2,
00065             ALenum format,unsigned int frequency,
00066             unsigned int buffersize);
00067 
00068 
00073         void run();
00074 
00078         void seek(float time_s);
00079 
00084         void setLooping(bool loop = true);
00085 
00086     protected:
00090         virtual ~FileStreamUpdater();
00091     };
00092 
00093 }
00094 
00095 #endif

Generated on Thu Oct 12 05:46:17 2006 for openalpp by  doxygen 1.4.7