Audio format reader interface.
More...
#include <format_registry.hpp>
|
| virtual | ~FormatReader ()=default |
| virtual std::optional< AudioFileInfo > | read_info (const std::string &path)=0 |
| | Read file info (metadata only).
|
| virtual std::optional< AudioFileData > | read (const std::string &path)=0 |
| | Read entire file into memory.
|
| virtual std::optional< AudioFileData > | read (const std::string &path, const DecodeLimits &limits) |
| | Read entire file into memory, refusing output beyond limits.
|
| virtual bool | supports_extension (std::string_view ext) const =0 |
| | Whether this reader supports the given file extension (e.g., ".flac").
|
| virtual std::string | format_name () const =0 |
| | Format name (e.g., "FLAC", "MP3").
|
Audio format reader interface.
◆ ~FormatReader()
| virtual pulp::audio::FormatReader::~FormatReader |
( |
| ) |
|
|
virtualdefault |
◆ format_name()
| virtual std::string pulp::audio::FormatReader::format_name |
( |
| ) |
const |
|
pure virtual |
Format name (e.g., "FLAC", "MP3").
◆ read() [1/2]
| virtual std::optional< AudioFileData > pulp::audio::FormatReader::read |
( |
const std::string & | path | ) |
|
|
pure virtual |
Read entire file into memory.
◆ read() [2/2]
| virtual std::optional< AudioFileData > pulp::audio::FormatReader::read |
( |
const std::string & | path, |
|
|
const DecodeLimits & | limits ) |
|
inlinevirtual |
Read entire file into memory, refusing output beyond limits.
Every built-in reader overrides this; the default exists for external readers that predate limits and falls back to read(path).
◆ read_info()
| virtual std::optional< AudioFileInfo > pulp::audio::FormatReader::read_info |
( |
const std::string & | path | ) |
|
|
pure virtual |
Read file info (metadata only).
◆ supports_extension()
| virtual bool pulp::audio::FormatReader::supports_extension |
( |
std::string_view | ext | ) |
const |
|
pure virtual |
Whether this reader supports the given file extension (e.g., ".flac").
The documentation for this class was generated from the following file: