Etterna 0.74.4
Loading...
Searching...
No Matches
RageSoundReader_Vorbisfile.h
1/* RageSoundReader_Vorbisfile - Read from a Vorbisfile interface. */
2
3#ifndef RAGE_SOUND_READER_VORBISFILE_H
4#define RAGE_SOUND_READER_VORBISFILE_H
5
6#include "RageSoundReader_FileReader.h"
7
8using OggVorbis_File = struct OggVorbis_File;
9class RageFileBasic;
10
12{
13 public:
14 OpenResult Open(RageFileBasic* pFile) override;
15
16 int GetLength() const override;
17 int SetPosition(int iFrame) override;
18 int Read(float* pBuf, int iFrames) override;
19 int GetSampleRate() const override;
20 unsigned GetNumChannels() const override { return channels; }
21 int GetNextSourceFrame() const override;
24 RageSoundReader_Vorbisfile* Copy() const override;
25
26 private:
27 OggVorbis_File* vf;
28 bool eof = false;
29 bool FillBuf();
30 std::string filename;
31 int read_offset = 0;
32 unsigned channels = 0;
33};
34
35#endif
Definition RageFileBasic.h:10
Definition RageSoundReader_FileReader.h:13
Definition RageSoundReader_Vorbisfile.h:12