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

Hard resource ceilings for one SMF import. More...

#include <smf.hpp>

Public Attributes

std::size_t max_file_bytes = 64u * 1024u * 1024u
 Raw file bytes, checked before decoding.
std::size_t max_tracks = 4'096
 Maximum MTrk chunks.
std::size_t max_events = 5'000'000
 Maximum decoded events across the whole file.
std::size_t max_notes = 5'000'000
 Maximum completed notes across the whole file.
std::size_t max_concurrent_notes = 65'536
 Maximum simultaneously open notes on one track.
std::size_t max_tempo_points = 65'536
 Maximum Set Tempo events.
std::size_t max_meter_points = 65'536
 Maximum Time Signature events.
std::size_t max_payload_bytes = 1u * 1024u * 1024u
 Maximum bytes in one meta-event or system-exclusive payload.
std::size_t max_track_name_bytes = 4'096
 Maximum decoded bytes in one track name.
std::int64_t max_smf_ticks = std::int64_t{1} << 34
 Absolute SMF tick ceiling for any event.

Detailed Description

Hard resource ceilings for one SMF import.

Every limit is checked before the corresponding state grows, so untrusted input cannot force an allocation larger than the caller authorized. A zero limit rejects any corresponding non-empty resource.

Member Data Documentation

◆ max_concurrent_notes

std::size_t pulp::timeline::SmfImportLimits::max_concurrent_notes = 65'536

Maximum simultaneously open notes on one track.

◆ max_events

std::size_t pulp::timeline::SmfImportLimits::max_events = 5'000'000

Maximum decoded events across the whole file.

◆ max_file_bytes

std::size_t pulp::timeline::SmfImportLimits::max_file_bytes = 64u * 1024u * 1024u

Raw file bytes, checked before decoding.

◆ max_meter_points

std::size_t pulp::timeline::SmfImportLimits::max_meter_points = 65'536

Maximum Time Signature events.

◆ max_notes

std::size_t pulp::timeline::SmfImportLimits::max_notes = 5'000'000

Maximum completed notes across the whole file.

◆ max_payload_bytes

std::size_t pulp::timeline::SmfImportLimits::max_payload_bytes = 1u * 1024u * 1024u

Maximum bytes in one meta-event or system-exclusive payload.

◆ max_smf_ticks

std::int64_t pulp::timeline::SmfImportLimits::max_smf_ticks = std::int64_t{1} << 34

Absolute SMF tick ceiling for any event.

◆ max_tempo_points

std::size_t pulp::timeline::SmfImportLimits::max_tempo_points = 65'536

Maximum Set Tempo events.

◆ max_track_name_bytes

std::size_t pulp::timeline::SmfImportLimits::max_track_name_bytes = 4'096

Maximum decoded bytes in one track name.

◆ max_tracks

std::size_t pulp::timeline::SmfImportLimits::max_tracks = 4'096

Maximum MTrk chunks.


The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/timeline/include/pulp/timeline/smf.hpp