Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OggStream.h
Go to the documentation of this file.
1 //
2 // C++ Interface: Audio::Codec
3 //
4 #ifndef __AUDIO_OGG_STREAM_H__INCLUDED__
5 #define __AUDIO_OGG_STREAM_H__INCLUDED__
6 
7 #ifdef HAVE_OGG
8 
9 #include "../Stream.h"
10 
11 #include "vsfilesystem.h"
12 
13 namespace Audio {
14 
15  namespace __impl {
16  struct OggData;
17  };
18 
29  class OggStream : public Stream
30  {
31  private:
32  double duration;
33  __impl::OggData *oggData;
35 
36  void *readBuffer;
37  unsigned int readBufferAvail;
38  unsigned int readBufferSize;
39 
40  public:
46  OggStream(const std::string& path, VSFileSystem::VSFileType type = VSFileSystem::UnknownFile) throw(Exception);
47 
48  virtual ~OggStream();
49 
50  protected:
51 
53  virtual double getLengthImpl() const throw(Exception);
54 
56  virtual double getPositionImpl() const throw();
57 
59  virtual void seekImpl(double position) throw(Exception);
60 
62  virtual void getBufferImpl(void *&buffer, unsigned int &bufferSize) throw(Exception);
63 
65  virtual void nextBufferImpl() throw(Exception);
66  };
67 
68 };
69 
70 #endif//HAVE_OGG
71 
72 #endif//__AUDIO_OGG_STREAM_H__INCLUDED__