29 #define OV_EXCLUDE_STATIC_CALLBACKS
31 #include "vorbis/codec.h"
32 #include "vorbis/vorbisfile.h"
34 namespace cinder {
namespace audio {
53 void performSeek(
size_t readPositionFrames )
override;
58 void setupConversionImpl();
61 static size_t readFn(
void *ptr,
size_t size,
size_t count,
void *datasource );
62 static int seekFn(
void *datasource, ogg_int64_t
offset,
int whence );
63 static int closeFn(
void *datasource );
64 static long tellFn(
void *datasource );
66 ::OggVorbis_File mOggVorbisFile;
70 size_t mNumChannels, mSampleRate;
SourceFile implementation for decoding ogg vorbis files.
Definition: FileOggVorbis.h:41
size_t performRead(Buffer *buffer, size_t bufferFrameOffset, size_t numFramesNeeded) override
Definition: FileOggVorbis.cpp:93
GLsizei const GLchar ** string
Definition: GLee.h:2427
SourceFileOggVorbis()
Definition: FileOggVorbis.cpp:35
Loads and reads from an audio file source.
Definition: Source.h:83
std::shared_ptr< class SourceFile > SourceFileRef
Definition: Source.h:34
size_t getNumChannels() const override
Returns the number of channels.
Definition: FileOggVorbis.h:49
std::shared_ptr< IStreamCinder > IStreamRef
Definition: Stream.h:142
std::string getMetaData() const override
Returns the metadata, if any, as a string.
Definition: FileOggVorbis.cpp:126
GLuint buffer
Definition: GLee.h:2065
SourceFileRef cloneWithSampleRate(size_t sampleRate) const override
Returns an copy of this Source with all properties identical except the sampleRate. This is useful if the SourceFile must match a samplerate that was unknown when it was first constructed.
Definition: FileOggVorbis.cpp:46
GLintptr offset
Definition: GLee.h:2095
GLuint GLuint GLsizei count
Definition: GLee.h:963
virtual ~SourceFileOggVorbis()
Definition: FileOggVorbis.cpp:59
size_t getSampleRateNative() const override
Returns the true samplerate of the Source.
Definition: FileOggVorbis.h:50
void performSeek(size_t readPositionFrames) override
Implement to perform seek. readPositionFrames is in native file units.
Definition: FileOggVorbis.cpp:120
std::shared_ptr< class DataSource > DataSourceRef
Definition: DataSource.h:35
GLsizeiptr size
Definition: GLee.h:2089