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

Fixed-capacity, single-producer/single-consumer audio analysis tap. More...

#include <audio_tap.hpp>

Public Member Functions

bool prepare (std::uint32_t channels, std::uint64_t capacity_frames)
void release () noexcept
void reset () noexcept
std::uint64_t push (BufferView< const float > source) noexcept
std::uint64_t push (BufferView< float > source) noexcept
bool read (BufferView< float > destination) noexcept
std::uint32_t num_channels () const noexcept
std::uint64_t available_frames () const noexcept
PlanarAudioRingBufferStats stats () const noexcept

Detailed Description

Fixed-capacity, single-producer/single-consumer audio analysis tap.

prepare() is off-RT. push() and drain() are allocation-free afterwards. Overflow is measured and dropped in whole frames, so channels cannot drift.

Member Function Documentation

◆ available_frames()

std::uint64_t pulp::audio::AudioTap::available_frames ( ) const
inlinenoexcept

◆ num_channels()

std::uint32_t pulp::audio::AudioTap::num_channels ( ) const
inlinenoexcept

◆ prepare()

bool pulp::audio::AudioTap::prepare ( std::uint32_t channels,
std::uint64_t capacity_frames )
inline

◆ push() [1/2]

std::uint64_t pulp::audio::AudioTap::push ( BufferView< const float > source)
inlinenoexcept

◆ push() [2/2]

std::uint64_t pulp::audio::AudioTap::push ( BufferView< float > source)
inlinenoexcept

◆ read()

bool pulp::audio::AudioTap::read ( BufferView< float > destination)
inlinenoexcept

◆ release()

void pulp::audio::AudioTap::release ( )
inlinenoexcept

◆ reset()

void pulp::audio::AudioTap::reset ( )
inlinenoexcept

◆ stats()

PlanarAudioRingBufferStats pulp::audio::AudioTap::stats ( ) const
inlinenoexcept

The documentation for this class was generated from the following file:
  • /home/runner/work/pulp/pulp/core/audio/include/pulp/audio/audio_tap.hpp