Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
audio_stats.hpp File Reference

Small POD counter struct for release-safe audio observability. More...

#include <cstdint>

Go to the source code of this file.

Classes

struct  pulp::audio::AudioStats
 Minimal release-safe audio counter aggregate. More...

Namespaces

namespace  pulp
namespace  pulp::audio

Detailed Description

Small POD counter struct for release-safe audio observability.

AudioStats is the always-available, minimal counter subset for release builds. It is a trivially-copyable aggregate so it can be published lock-free and read on any thread.

OWNERSHIP BOUNDARY (do not relitigate without a code change):

  • Signal-content counters — callbacks, underruns, clipped_blocks, nan_blocks — are owned by the probe / host audio path and reflect the content of rendered blocks.
  • Device/backend counters — device_xruns, cpu_overloads — are MIRRORS. They are populated by the HOST from AudioDeviceManager::xrun_count() and the CoreAudio overload listener, which already own that accounting. pulp::audio::AudioProbe MUST NOT increment device_xruns or cpu_overloads and must not shadow the device's own counters; doing so creates a second copy that silently diverges from the device owner.

This struct is intentionally tiny and has no behavior. It carries no std::vector, no per-channel data, and no FFT/spectrum fields. Richer per-stage signal facts (NaN/Inf counts, exact clip counts, silence runs, sequence/stale accounting, stage metadata) live on pulp::audio::AudioProbeSnapshot, not here.