Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::audio::DecodeLimits Struct Reference

Resource ceilings a reader enforces on decoded output. More...

#include <format_registry.hpp>

Static Public Member Functions

static DecodeLimits unbounded ()
 No ceilings at all: every field zero.

Public Attributes

std::uint64_t max_frames = 1ull << 30
std::uint32_t max_channels = 64u
std::uint64_t max_output_bytes = 4ull * 1024u * 1024u * 1024u

Detailed Description

Resource ceilings a reader enforces on decoded output.

Container headers are untrusted: a reader checks the claimed size against these limits before allocating, then keeps checking as frames arrive, so a tiny file cannot request terabytes of output. A zero field means that ceiling is not enforced. The plain read(path) overloads apply these defaults, which admit ordinary long recordings (2^30 frames is over three hours of stereo at 96 kHz within 4 GiB of float output); callers reading longer material pass larger limits explicitly, and trusted local-file callers whose path was chosen by the user or host pass unbounded(). Field names match WavDecodeLimits.

Member Function Documentation

◆ unbounded()

DecodeLimits pulp::audio::DecodeLimits::unbounded ( )
inlinestatic

No ceilings at all: every field zero.

Member Data Documentation

◆ max_channels

std::uint32_t pulp::audio::DecodeLimits::max_channels = 64u

◆ max_frames

std::uint64_t pulp::audio::DecodeLimits::max_frames = 1ull << 30

◆ max_output_bytes

std::uint64_t pulp::audio::DecodeLimits::max_output_bytes = 4ull * 1024u * 1024u * 1024u

The documentation for this struct was generated from the following file: