dbf-halloween2015

diff src/audio/ovstream.h @ 0:50683c78264e

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Nov 2015 00:09:12 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/audio/ovstream.h	Sun Nov 01 00:09:12 2015 +0200
     1.3 @@ -0,0 +1,27 @@
     1.4 +#ifndef OVSTREAM_H_
     1.5 +#define OVSTREAM_H_
     1.6 +
     1.7 +#include <pthread.h>
     1.8 +#include <vorbis/vorbisfile.h>
     1.9 +#include "stream.h"
    1.10 +
    1.11 +class OggVorbisStream : public AudioStream {
    1.12 +private:
    1.13 +	OggVorbis_File vf;
    1.14 +	bool vfopen;
    1.15 +	pthread_mutex_t vflock;
    1.16 +
    1.17 +	virtual bool more_samples(AudioStreamBuffer *buf);
    1.18 +
    1.19 +public:
    1.20 +	OggVorbisStream();
    1.21 +	virtual ~OggVorbisStream();
    1.22 +
    1.23 +	bool open(const char *fname);
    1.24 +	void close();
    1.25 +
    1.26 +	virtual void play(AUDIO_PLAYMODE mode);
    1.27 +	virtual void rewind();
    1.28 +};
    1.29 +
    1.30 +#endif  // OVSTREAM_H_