MOS
|
Cache for heavy audio assets. More...
#include <assets.hpp>
Public Types | |
using | Buffer_map = std::unordered_map< std::string, Shared_buffer > |
using | Buffer_pair = std::pair< std::string, Shared_buffer > |
Public Member Functions | |
Assets (const std::filesystem::path &directory="assets/") | |
Assets (const Assets &assets)=delete | |
Assets (const Assets &&assets)=delete | |
Assets & | operator= (const Assets &assets)=delete |
Assets & | operator= (const Assets &&assets)=delete |
auto | audio_buffer (const std::filesystem::path &path) -> Shared_buffer |
Loads an *.ogg file into a buffer and caches it. More... | |
auto | clear_unused () -> void |
Remove unused buffers. More... | |
auto | clear () -> void |
Remove all buffers. | |
auto | directory () const -> std::filesystem::path |
Directory of assets. | |
Cache for heavy audio assets.
auto mos::aud::Assets::audio_buffer | ( | const std::filesystem::path & | path | ) | -> Shared_buffer |
Loads an *.ogg file into a buffer and caches it.
auto mos::aud::Assets::clear_unused | ( | ) | -> void |
Remove unused buffers.