added audio
[laserbrain_demo] / src / audio / ovstream.h
1 #ifndef OVSTREAM_H_
2 #define OVSTREAM_H_
3
4 #include <pthread.h>
5 #include <vorbis/vorbisfile.h>
6 #include "stream.h"
7
8 class OggVorbisStream : public AudioStream {
9 private:
10         OggVorbis_File vf;
11         bool vfopen;
12         pthread_mutex_t vflock;
13
14         virtual bool more_samples(AudioStreamBuffer *buf);
15
16 public:
17         OggVorbisStream();
18         virtual ~OggVorbisStream();
19
20         bool open(const char *fname);
21         void close();
22
23         virtual void rewind();
24 };
25
26 #endif  // OVSTREAM_H_