DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
LoudnessMeter.h File Reference

Thread-safe EBU R128 / ITU-R BS.1770 loudness meter. More...

#include "../Core/DspMath.h"
#include "../Core/AudioSpec.h"
#include "../Core/AudioBuffer.h"
#include "../Core/TruePeakDetector.h"
#include <algorithm>
#include <atomic>
#include <cmath>
#include <cstdint>
#include <numbers>
#include <array>
Include dependency graph for LoudnessMeter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dspark::LoudnessMeter< T >
 Real-time safe EBU R128 loudness meter. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Detailed Description

Thread-safe EBU R128 / ITU-R BS.1770 loudness meter.

Momentary (400 ms), short-term (3 s), integrated (two-pass gated), loudness range (EBU Tech 3342) and true peak (BS.1770 4x estimate). Integrated loudness and LRA use constant-memory histograms: no allocation and O(bins) readout, real-time safe. Verified against the official EBU Tech 3341/3342 conformance vectors (CI gate).

Threading:

  • prepare() / reset(): setup thread / stream owner (not concurrent with the process calls or the readers).
  • process() / processBlock(): audio thread (stream owner). No-op before prepare().
  • All readouts (getMomentaryLUFS, getShortTermLUFS, getIntegratedLUFS, getLoudnessRange, getTruePeakDb): any thread, lock-free; values are approximate while a block is in flight (metering).

Dependencies: AudioBuffer.h, AudioSpec.h, DspMath.h, TruePeakDetector.h.

Definition in file LoudnessMeter.h.