12#include <vorbis/vorbisfile.h>
25 static size_t read_func(
void *ptr,
size_t size,
size_t nmemb,
void *datasource)
noexcept;
26 static int seek_func(
void *datasource, ogg_int64_t offset,
int whence)
noexcept;
27 static int close_func(
void *datasource)
noexcept;
28 static long tell_func(
void *datasource)
noexcept;
66 std::optional<OggFileDecodeInfo>
getDecodeInfo(
const std::string &filename_for_logging);
#define DISABLE_CLASS_COPY(C)
Definition basic_macros.h:26
Definition al_extensions.cpp:11
Metadata of an Ogg-Vorbis file, used for decoding.
Definition ogg_file.h:37
bool is_stereo
Definition ogg_file.h:39
ALuint length_samples
Definition ogg_file.h:43
std::string name_for_logging
Definition ogg_file.h:38
f32 length_seconds
Definition ogg_file.h:44
ALenum format
Definition ogg_file.h:40
ALsizei freq
Definition ogg_file.h:42
size_t bytes_per_sample
Definition ogg_file.h:41
For vorbisfile to read from our buffer instead of from a file.
Definition ogg_file.h:21
size_t cur_offset
Definition ogg_file.h:23
static const ov_callbacks s_ov_callbacks
Definition ogg_file.h:30
static long tell_func(void *datasource) noexcept
Definition ogg_file.cpp:67
static size_t read_func(void *ptr, size_t size, size_t nmemb, void *datasource) noexcept
Definition ogg_file.cpp:21
static int close_func(void *datasource) noexcept
Definition ogg_file.cpp:60
static int seek_func(void *datasource, ogg_int64_t offset, int whence) noexcept
Definition ogg_file.cpp:31
std::string buf
Definition ogg_file.h:22
RAII wrapper for openal sound buffers.
Definition al_helpers.h:78
RAII wrapper for OggVorbis_File.
Definition ogg_file.h:50
std::optional< OggFileDecodeInfo > getDecodeInfo(const std::string &filename_for_logging)
Definition ogg_file.cpp:84
OggVorbis_File m_file
Definition ogg_file.h:52
OggVorbis_File * get()
Definition ogg_file.h:64
RAIIALSoundBuffer loadBuffer(const OggFileDecodeInfo &decode_info, ALuint pcm_start, ALuint pcm_end)
Main function for loading ogg vorbis sounds.
Definition ogg_file.cpp:161
~RAIIOggFile() noexcept
Definition ogg_file.h:58
bool m_needs_clear
Definition ogg_file.h:51