RAII wrapper for OggVorbis_File. More...
#include <ogg_file.h>
Public Member Functions | |
| RAIIOggFile ()=default | |
| ~RAIIOggFile () noexcept | |
| OggVorbis_File * | get () |
| std::optional< OggFileDecodeInfo > | getDecodeInfo (const std::string &filename_for_logging) |
| RAIIALSoundBuffer | loadBuffer (const OggFileDecodeInfo &decode_info, ALuint pcm_start, ALuint pcm_end) |
| Main function for loading ogg vorbis sounds. | |
Public Attributes | |
| bool | m_needs_clear = false |
| OggVorbis_File | m_file |
RAII wrapper for OggVorbis_File.
|
default |
|
inlinenoexcept |
References m_file, and m_needs_clear.
|
inline |
References m_file.
| std::optional< OggFileDecodeInfo > sound::RAIIOggFile::getDecodeInfo | ( | const std::string & | filename_for_logging | ) |
References sound::OggFileDecodeInfo::bytes_per_sample, sound::OggFileDecodeInfo::format, sound::OggFileDecodeInfo::freq, sound::OggFileDecodeInfo::is_stereo, sound::OggFileDecodeInfo::length_samples, sound::OggFileDecodeInfo::length_seconds, m_file, sound::OggFileDecodeInfo::name_for_logging, and warningstream.
| RAIIALSoundBuffer sound::RAIIOggFile::loadBuffer | ( | const OggFileDecodeInfo & | decode_info, |
| ALuint | pcm_start, | ||
| ALuint | pcm_end ) |
Main function for loading ogg vorbis sounds.
Loads exactly the specified interval of PCM-data, and creates an OpenAL buffer with it.
| decode_info | Cached meta information of the file. |
| pcm_start | First sample in the interval. |
| pcm_end | One after last sample of the interval (=> exclusive). |
References sound::OggFileDecodeInfo::bytes_per_sample, sound::OggFileDecodeInfo::format, sound::OggFileDecodeInfo::freq, sound::RAIIALSoundBuffer::generate(), sound::RAIIALSoundBuffer::get(), sound::getAlErrorString(), infostream, sound::OggFileDecodeInfo::length_samples, m_file, sound::OggFileDecodeInfo::name_for_logging, and warningstream.
Here is the call graph for this function:| OggVorbis_File sound::RAIIOggFile::m_file |
Referenced by ~RAIIOggFile(), get(), getDecodeInfo(), and loadBuffer().
| bool sound::RAIIOggFile::m_needs_clear = false |
Referenced by ~RAIIOggFile().