|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
Decode-only native FLAC implementation with eager integrity checks. More...
#include <FlacFile.h>


Public Member Functions | |
| ~FlacFile () override | |
| bool | openRead (const std::filesystem::path &path) override |
| Opens and fully validates a native FLAC stream. | |
| bool | openWrite (const std::filesystem::path &path, const AudioFileInfo &info) override |
| FLAC encoding is unsupported; closes prior state and returns false. | |
| AudioFileInfo | getInfo () const override |
| Returns current stream metadata, or default metadata when closed. | |
| bool | readSamples (AudioBufferView< float > dest) override |
| Reads from sample zero, clamped to the destination dimensions. | |
| bool | readSamples (AudioBufferView< float > dest, int64_t startFrame, int64_t numFrames) override |
| Decodes an exact valid file range into the destination capacity. | |
| bool | writeSamples (AudioBufferView< const float > src) override |
| Always returns false because this class is decode-only. | |
| void | close () override |
| Releases compressed data, metadata, and the frame index. | |
| bool | isOpen () const noexcept override |
| True only after a complete stream has passed eager validation. | |
Public Member Functions inherited from dspark::AudioFile | |
| virtual | ~AudioFile ()=default |
Static Public Attributes | |
| static constexpr uint64_t | kMaxInputBytes = 256ull * 1024 * 1024 |
| Maximum compressed input retained by one instance. | |
| static constexpr uint64_t | kMaxMetadataBlocks = 65536 |
| Maximum number of metadata block headers scanned. | |
| static constexpr uint64_t | kMaxFrames = 1048576 |
| Maximum number of indexed audio frames. | |
| static constexpr uint64_t | kMaxInterchannelSamples = 1ull << 31 |
| Maximum decoded interchannel sample count. | |
| static constexpr uint64_t | kMaxDecodedPcmBytes = 8ull << 30 |
| Maximum logical decoded PCM byte count. | |
| static constexpr uint64_t | kMaxRiceUnaryZeros = 1ull << 20 |
| Maximum zero run accepted in one Rice unary code. | |
| static constexpr std::string_view | kWriteUnsupportedReason |
| Stable explanation returned by documentation for write failure. | |
Decode-only native FLAC implementation with eager integrity checks.
Definition at line 47 of file FlacFile.h.
|
inlineoverride |
Definition at line 66 of file FlacFile.h.
|
inlineoverridevirtual |
Releases compressed data, metadata, and the frame index.
Implements dspark::AudioFile.
Definition at line 210 of file FlacFile.h.
|
inlineoverridevirtual |
Returns current stream metadata, or default metadata when closed.
Implements dspark::AudioFile.
Definition at line 120 of file FlacFile.h.
|
inlineoverridevirtualnoexcept |
True only after a complete stream has passed eager validation.
Implements dspark::AudioFile.
Definition at line 220 of file FlacFile.h.
|
inlineoverridevirtual |
Opens and fully validates a native FLAC stream.
Implements dspark::AudioFile.
Definition at line 72 of file FlacFile.h.
|
inlineoverridevirtual |
FLAC encoding is unsupported; closes prior state and returns false.
The destination path is never opened or modified.
Implements dspark::AudioFile.
Definition at line 110 of file FlacFile.h.
|
inlineoverridevirtual |
Reads from sample zero, clamped to the destination dimensions.
Implements dspark::AudioFile.
Definition at line 123 of file FlacFile.h.
|
inlineoverridevirtual |
Decodes an exact valid file range into the destination capacity.
The requested range must be wholly valid. Transfer is clamped to the destination's frames and channels, leaving every excess element untouched.
Implements dspark::AudioFile.
Definition at line 135 of file FlacFile.h.
|
inlineoverridevirtual |
Always returns false because this class is decode-only.
Implements dspark::AudioFile.
Definition at line 203 of file FlacFile.h.
|
staticconstexpr |
Maximum logical decoded PCM byte count.
Definition at line 59 of file FlacFile.h.
|
staticconstexpr |
Maximum number of indexed audio frames.
Definition at line 55 of file FlacFile.h.
|
staticconstexpr |
Maximum compressed input retained by one instance.
Definition at line 51 of file FlacFile.h.
|
staticconstexpr |
Maximum decoded interchannel sample count.
Definition at line 57 of file FlacFile.h.
|
staticconstexpr |
Maximum number of metadata block headers scanned.
Definition at line 53 of file FlacFile.h.
|
staticconstexpr |
Maximum zero run accepted in one Rice unary code.
Definition at line 61 of file FlacFile.h.
|
staticconstexpr |
Stable explanation returned by documentation for write failure.
Definition at line 63 of file FlacFile.h.