le2d v0.4.6
2D game engine framework
 
Loading...
Searching...
No Matches
audio_buffer.hpp
Go to the documentation of this file.
1#pragma once
3#include <capo/source.hpp>
4#include <kvf/time.hpp>
5
6namespace le {
8class IAudioBuffer : public IResource {
9 public:
13 virtual auto decode(std::span<std::byte const> bytes, std::optional<capo::Encoding> encoding = {}) -> bool = 0;
14
16 [[nodiscard]] virtual auto get_duration() const -> kvf::Seconds = 0;
17
21 virtual auto bind(capo::ISource& source) const -> bool = 0;
22};
23} // namespace le
Opaque interface for an Audio Buffer.
Definition audio_buffer.hpp:8
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.
Interface for all shared resources in the engine.
Definition resource.hpp:6
Definition texture.hpp:9
Definition animation.hpp:8