28#include <vorbis/vorbisfile.h>
41 static size_t read_func(
void *ptr,
size_t size,
size_t nmemb,
void *datasource)
noexcept;
42 static int seek_func(
void *datasource, ogg_int64_t offset,
int whence)
noexcept;
43 static int close_func(
void *datasource)
noexcept;
44 static long tell_func(
void *datasource)
noexcept;
82 std::optional<OggFileDecodeInfo>
getDecodeInfo(
const std::string &filename_for_logging);
#define DISABLE_CLASS_COPY(C)
Definition basic_macros.h:35
Definition al_extensions.cpp:26
Metadata of an Ogg-Vorbis file, used for decoding.
Definition ogg_file.h:53
bool is_stereo
Definition ogg_file.h:55
ALuint length_samples
Definition ogg_file.h:59
std::string name_for_logging
Definition ogg_file.h:54
f32 length_seconds
Definition ogg_file.h:60
ALenum format
Definition ogg_file.h:56
ALsizei freq
Definition ogg_file.h:58
size_t bytes_per_sample
Definition ogg_file.h:57
For vorbisfile to read from our buffer instead of from a file.
Definition ogg_file.h:37
size_t cur_offset
Definition ogg_file.h:39
static const ov_callbacks s_ov_callbacks
Definition ogg_file.h:46
static long tell_func(void *datasource) noexcept
Definition ogg_file.cpp:82
static size_t read_func(void *ptr, size_t size, size_t nmemb, void *datasource) noexcept
Definition ogg_file.cpp:36
static int close_func(void *datasource) noexcept
Definition ogg_file.cpp:75
static int seek_func(void *datasource, ogg_int64_t offset, int whence) noexcept
Definition ogg_file.cpp:46
std::string buf
Definition ogg_file.h:38
RAII wrapper for openal sound buffers.
Definition al_helpers.h:94
RAII wrapper for OggVorbis_File.
Definition ogg_file.h:66
std::optional< OggFileDecodeInfo > getDecodeInfo(const std::string &filename_for_logging)
Definition ogg_file.cpp:99
OggVorbis_File m_file
Definition ogg_file.h:68
OggVorbis_File * get()
Definition ogg_file.h:80
RAIIALSoundBuffer loadBuffer(const OggFileDecodeInfo &decode_info, ALuint pcm_start, ALuint pcm_end)
Main function for loading ogg vorbis sounds.
Definition ogg_file.cpp:176
~RAIIOggFile() noexcept
Definition ogg_file.h:74
bool m_needs_clear
Definition ogg_file.h:67