le2d v0.4.3
2D game engine framework
 
Loading...
Searching...
No Matches
le::IAudioBuffer Class Referenceabstract

Opaque interface for an Audio Buffer. More...

#include <le2d/resource/audio_buffer.hpp>

Inheritance diagram for le::IAudioBuffer:
le::IResource le::IAsset

Public Member Functions

virtual auto decode (std::span< std::byte const > bytes, std::optional< capo::Encoding > encoding={}) -> bool=0
 
virtual auto get_duration () const -> kvf::Seconds=0
 
virtual auto bind (capo::ISource &source) const -> bool=0
 Bind this audio buffer to a source.
 
- Public Member Functions inherited from le::IResource
virtual auto is_ready () const -> bool=0
 Check if resource is ready to use.
 

Detailed Description

Opaque interface for an Audio Buffer.

Member Function Documentation

◆ bind()

virtual auto le::IAudioBuffer::bind ( capo::ISource &  source) const -> bool
pure virtual

Bind this audio buffer to a source.

Parameters
sourceSource to bind to.
Returns
true if successfully bound.

◆ decode()

virtual auto le::IAudioBuffer::decode ( std::span< std::byte const >  bytes,
std::optional< capo::Encoding >  encoding = {} 
) -> bool
pure virtual
Parameters
bytesBytes to load.
encodingEncoding of audio data, if known.
Returns
true if successfully loaded.

◆ get_duration()

virtual auto le::IAudioBuffer::get_duration ( ) const -> kvf::Seconds
pure virtual
Returns
Length of the audio data in seconds.

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