14 #ifndef VORBISAUDIOCURSOR_H 15 #define VORBISAUDIOCURSOR_H 22 #include <vorbis/codec.h> 23 #include <vorbis/vorbisfile.h> 33 explicit VorbisAudioCursor(VorbisAudio *src, std::istream *stream);
34 virtual ~VorbisAudioCursor();
35 virtual void seek(
double offset);
44 static size_t cb_read_func(
void *ptr,
size_t size,
size_t nmemb,
void *datasource);
45 static int cb_seek_func(
void *datasource, ogg_int64_t offset,
int whence);
46 static int cb_close_func(
void *datasource);
47 static long cb_tell_func(
void *datasource);
57 int _bytes_per_sample;
60 std::streampos _data_start;
61 std::streampos _data_pos;
68 static void init_type() {
69 MovieAudioCursor::init_type();
71 MovieAudioCursor::get_class_type());
74 return get_class_type();
76 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
86 #endif // VORBISAUDIOCURSOR_H void read_samples(int n, Datagram *dg)
Read audio samples from the stream into a Datagram.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A MovieAudio is actually any source that provides a sequence of audio samples.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
TypeHandle is the identifier used to differentiate C++ class types.
virtual void seek(double offset)
Skips to the specified offset within the file.