Classes | |
class | Buffer |
Audio Buffer: stores decoded PCM data in memory. More... | |
class | IEngine |
Audio Engine. API to create Audio Sources. Represents 3D spatialized listener. Uses default audio device. More... | |
class | ISource |
Audio Source. API for audio playback. Open file for streaming or bind to existing Audio Buffer. Supports 3D spatialization. More... | |
class | IStream |
Interface for custom audio stream (data source). Supports streaming data of indefinite length. The API is in terms of samples, they are converted to frames by the library. More... | |
class | IStreamPipe |
IStream wrapper that enables subtypes to push arbitrary number of samples. More... | |
class | Polymorphic |
Base class for polymorphic types. More... | |
struct | Vec3f |
3D spatial vector. More... | |
Enumerations | |
enum class | Encoding : std::int8_t { Wav , Mp3 , Flac } |
Format of encoded data. More... | |
Functions | |
auto | guess_encoding (std::string_view path) -> std::optional< Encoding > |
Guess the Encoding format based on the file extension. | |
auto | file_to_bytes (char const *path) -> std::vector< std::byte > |
Load file data as a binary byte array. | |
auto | create_engine () -> std::unique_ptr< IEngine > |
Create an Engine instance. | |
void | format_duration_to (std::string &out, std::chrono::duration< float > dt) |
Format duration as [HH:]MM:SS. | |
auto | format_duration (std::chrono::duration< float > dt) -> std::string |
Format duration as [HH:]MM:SS. | |
void | format_bytes_to (std::string &out, std::uint64_t bytes) |
Format bytes as human-readable, eg '924.5MiB'. | |
auto | format_bytes (std::uint64_t bytes) -> std::string |
Format bytes as human-readable, eg '924.5MiB'. | |
|
strong |
auto capo::create_engine | ( | ) | -> std::unique_ptr< IEngine > |
Create an Engine instance.
auto capo::file_to_bytes | ( | char const * | path | ) | -> std::vector< std::byte > |
Load file data as a binary byte array.
auto capo::format_bytes | ( | std::uint64_t | bytes | ) | -> std::string |
Format bytes as human-readable, eg '924.5MiB'.
bytes | Byte count. |
void capo::format_bytes_to | ( | std::string & | out, |
std::uint64_t | bytes | ||
) |
Format bytes as human-readable, eg '924.5MiB'.
out | Output string. |
bytes | Byte count. |
auto capo::format_duration | ( | std::chrono::duration< float > | dt | ) | -> std::string |
Format duration as [HH:]MM:SS.
dt | Duration. |
void capo::format_duration_to | ( | std::string & | out, |
std::chrono::duration< float > | dt | ||
) |
Format duration as [HH:]MM:SS.
out | Output string. |
dt | Duration. |
auto capo::guess_encoding | ( | std::string_view | path | ) | -> std::optional< Encoding > |
Guess the Encoding format based on the file extension.