MOS
Public Types | Public Member Functions | List of all members
mos::aud::Assets Class Referencefinal

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
 
Assetsoperator= (const Assets &assets)=delete
 
Assetsoperator= (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.
 

Detailed Description

Cache for heavy audio assets.

Member Function Documentation

◆ audio_buffer()

auto mos::aud::Assets::audio_buffer ( const std::filesystem::path &  path) -> Shared_buffer

Loads an *.ogg file into a buffer and caches it.

◆ clear_unused()

auto mos::aud::Assets::clear_unused ( ) -> void

Remove unused buffers.


The documentation for this class was generated from the following file: