31 bool open(
std::string_view path,
std::
size_t maximum_mapped_bytes);
53 bool read_frames(
float** dest_channels, uint32_t num_channels, uint64_t start_frame,
72 const uint8_t*
data()
const;
91 std::unique_ptr<BackingState> backing_;
94 std::unique_ptr<RangedState> ranged_;
96 bool read_frames_impl(
float** dest_channels, uint32_t num_channels, uint64_t start_frame,
97 uint64_t num_frames,
bool allow_whole_file_fallback);
void close()
Close the mapped file.
bool supports_ranged_read() const
True when a ranged (seek-based, no whole-file decode) reader is active for this file.
bool path_refers_to_open_file(std::string_view path) const noexcept
runtime::AccessPolicyTarget prepare_access_policy_target(std::string_view destination) const noexcept
bool read_frames_ranged_only(float **dest_channels, uint32_t num_channels, uint64_t start_frame, uint64_t num_frames)
Strict counterpart to read_frames().
bool open(std::string_view path)
Open and memory-map an audio file. Returns false on failure.
MemoryMappedAudioReader(MemoryMappedAudioReader &&) noexcept
MemoryMappedAudioReader()
bool copy_access_policy_to(std::string_view destination) const noexcept
Copy the access policy captured by the retained source handle to an existing artifact.
bool is_open() const
Whether an immutable snapshot of the source is currently mapped.
const uint8_t * data() const
Raw bytes from the immutable source snapshot (for custom decoding).
std::optional< AudioFileData > read_all()
Read the entire immutable source snapshot.
bool read_frames(float **dest_channels, uint32_t num_channels, uint64_t start_frame, uint64_t num_frames)
Read a range of frames into deinterleaved float buffers.
const AudioFileInfo & info() const
File info (available after open).
Definition mmap_reader.hpp:40
runtime::FileIdentity opened_file_identity() const noexcept
~MemoryMappedAudioReader()
Definition memory_mapped_file.hpp:26
Definition analyzer_provider.hpp:12
Definition audio_file.hpp:13
Definition memory_mapped_file.hpp:16