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

Realtime-safe bridge for audio visualization data. More...

#include <algorithm>
#include <array>
#include <atomic>
#include <cmath>
#include <cstdint>
#include <pulp/audio/planar_audio_ring_buffer.hpp>
#include <pulp/runtime/triple_buffer.hpp>
#include <pulp/signal/multi_channel_meter.hpp>
#include <pulp/signal/spectrogram.hpp>
#include <pulp/signal/stft.hpp>
#include <vector>

Go to the source code of this file.

Classes

struct  pulp::dataplane::VisualizationBenchSink
 Where the bridge reports its benchmark timings. More...
struct  pulp::dataplane::SpectrumData
 Published one-sided amplitude spectrum (lock-free via TripleBuffer). More...
struct  pulp::dataplane::WaveformData
 Published waveform capture (latest buffer snapshot). More...
struct  pulp::dataplane::VisualizationConfig
 Configuration for the visualization bridge. More...
class  pulp::dataplane::VisualizationBridge
 Central visualization bridge: a fixed multichannel audio tap plus a caller-driven, non-RT analyzer and lock-free latest-value publication. More...

Namespaces

namespace  pulp
namespace  pulp::dataplane

Enumerations

enum class  pulp::dataplane::VisualizationBacklogPolicy { pulp::dataplane::in_order , pulp::dataplane::latest_window }
 How poll() treats captured audio it has not analyzed yet. More...

Detailed Description

Realtime-safe bridge for audio visualization data.

The audio callback only meters the block and copies it into a fixed-capacity SPSC tap. FFT and waveform assembly happen when the UI owner calls poll(). Snapshot reads stay cheap and never drain or analyze audio. This keeps visualization cadence independent of audio callback cadence and makes the producer path allocation-free after configure().

The same data published here is accessible from JS via AudioBridge → widget_bridge.cpp bindings.