TDME2 1.9.121
VorbisAudioStream.h
Go to the documentation of this file.
1#pragma once
2
3#include <array>
4#include <string>
5
6#include <tdme/tdme.h>
10
11using std::array;
12using std::string;
13
17
18/**
19 * Vorbis audio stream
20 * @author Andreas Drewke
21 * @version $Id$
22 */
24 : public AudioStream
25{
26 friend class Audio;
27
28private:
29 string pathName;
30 string fileName;
32 bool initiated { false };
33
34public:
35 /**
36 * Protected constructor
37 * @param id id
38 * @param pathName path name
39 * @param fileName file name
40 */
41 VorbisAudioStream(const string& id, const string& pathName, const string& fileName);
42
43 // overridden methods
44 void rewind() override;
45
46protected:
47 // overridden methods
48 bool initialize() override;
49 void dispose() override;
50
51 /**
52 * Destructor
53 */
54 virtual ~VorbisAudioStream();
55
56 // overridden methods
57 void fillBuffer(ByteBuffer* data) override;
58};
Interface to audio module.
Definition: Audio.h:30
VorbisAudioStream(const string &id, const string &pathName, const string &fileName)
Protected constructor.
void rewind() override
Rewinds this audio entity.
void dispose() override
Dispose this entity from OpenAL.
bool initialize() override
Initiates this OpenAL entity to OpenAl.
void fillBuffer(ByteBuffer *data) override
Fill buffer.
virtual ~VorbisAudioStream()
Destructor.
OGG/Vorbis audio decoder.
Definition: VorbisDecoder.h:29
Byte buffer class.
Definition: ByteBuffer.h:24