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

#include <rolling_audio_capture_buffer.hpp>

Public Member Functions

 RollingAudioCaptureBuffer ()=default
bool prepare (const RollingAudioCaptureBufferConfig &config)
RollingAudioCapturePrepareResult prepare_seconds (std::uint32_t num_channels, double sample_rate, double seconds, std::uint64_t max_bytes=0)
void reset () noexcept
std::uint32_t num_channels () const noexcept
std::uint64_t capacity_frames () const noexcept
std::uint64_t allocated_bytes () const noexcept
std::uint64_t frames_discarded_while_held () const noexcept
void append (BufferView< const float > source, std::uint64_t frames) noexcept
void append (BufferView< float > source, std::uint64_t frames) noexcept
RollingAudioCaptureSnapshot snapshot_last (std::uint64_t frames) const noexcept
RollingAudioCaptureHold hold_last (std::uint64_t frames) noexcept
RollingAudioCaptureSnapshot begin_hold_last (std::uint64_t frames) noexcept
bool hold_active () const noexcept
void end_hold () noexcept
RollingAudioCaptureMaterializeResult materialize_held (const RollingAudioCaptureHold &hold, BufferView< float > destination) const noexcept
RollingAudioCaptureMaterializeResult materialize_held (const RollingAudioCaptureSnapshot &snapshot, BufferView< float > destination) const noexcept
RollingAudioCaptureMaterializeResult materialize_quiescent (const RollingAudioCaptureSnapshot &snapshot, BufferView< float > destination) const noexcept
RollingAudioCaptureMaterializeResult materialize (const RollingAudioCaptureSnapshot &snapshot, BufferView< float > destination) const noexcept

Static Public Member Functions

static std::uint64_t estimate_bytes (std::uint32_t num_channels, std::uint64_t frames, std::uint64_t bytes_per_sample=sizeof(float)) noexcept

Friends

class RollingAudioCaptureHold

Constructor & Destructor Documentation

◆ RollingAudioCaptureBuffer()

pulp::audio::RollingAudioCaptureBuffer::RollingAudioCaptureBuffer ( )
default

Member Function Documentation

◆ allocated_bytes()

std::uint64_t pulp::audio::RollingAudioCaptureBuffer::allocated_bytes ( ) const
noexcept

◆ append() [1/2]

void pulp::audio::RollingAudioCaptureBuffer::append ( BufferView< const float > source,
std::uint64_t frames )
noexcept

◆ append() [2/2]

void pulp::audio::RollingAudioCaptureBuffer::append ( BufferView< float > source,
std::uint64_t frames )
noexcept

◆ begin_hold_last()

RollingAudioCaptureSnapshot pulp::audio::RollingAudioCaptureBuffer::begin_hold_last ( std::uint64_t frames)
noexcept

◆ capacity_frames()

std::uint64_t pulp::audio::RollingAudioCaptureBuffer::capacity_frames ( ) const
inlinenoexcept

◆ end_hold()

void pulp::audio::RollingAudioCaptureBuffer::end_hold ( )
noexcept

◆ estimate_bytes()

std::uint64_t pulp::audio::RollingAudioCaptureBuffer::estimate_bytes ( std::uint32_t num_channels,
std::uint64_t frames,
std::uint64_t bytes_per_sample = sizeof(float) )
staticnoexcept

◆ frames_discarded_while_held()

std::uint64_t pulp::audio::RollingAudioCaptureBuffer::frames_discarded_while_held ( ) const
inlinenoexcept

◆ hold_active()

bool pulp::audio::RollingAudioCaptureBuffer::hold_active ( ) const
noexcept

◆ hold_last()

RollingAudioCaptureHold pulp::audio::RollingAudioCaptureBuffer::hold_last ( std::uint64_t frames)
noexcept

◆ materialize()

RollingAudioCaptureMaterializeResult pulp::audio::RollingAudioCaptureBuffer::materialize ( const RollingAudioCaptureSnapshot & snapshot,
BufferView< float > destination ) const
noexcept

◆ materialize_held() [1/2]

RollingAudioCaptureMaterializeResult pulp::audio::RollingAudioCaptureBuffer::materialize_held ( const RollingAudioCaptureHold & hold,
BufferView< float > destination ) const
noexcept

◆ materialize_held() [2/2]

RollingAudioCaptureMaterializeResult pulp::audio::RollingAudioCaptureBuffer::materialize_held ( const RollingAudioCaptureSnapshot & snapshot,
BufferView< float > destination ) const
noexcept

◆ materialize_quiescent()

RollingAudioCaptureMaterializeResult pulp::audio::RollingAudioCaptureBuffer::materialize_quiescent ( const RollingAudioCaptureSnapshot & snapshot,
BufferView< float > destination ) const
noexcept

◆ num_channels()

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

◆ prepare()

bool pulp::audio::RollingAudioCaptureBuffer::prepare ( const RollingAudioCaptureBufferConfig & config)

◆ prepare_seconds()

RollingAudioCapturePrepareResult pulp::audio::RollingAudioCaptureBuffer::prepare_seconds ( std::uint32_t num_channels,
double sample_rate,
double seconds,
std::uint64_t max_bytes = 0 )

◆ reset()

void pulp::audio::RollingAudioCaptureBuffer::reset ( )
noexcept

◆ snapshot_last()

RollingAudioCaptureSnapshot pulp::audio::RollingAudioCaptureBuffer::snapshot_last ( std::uint64_t frames) const
noexcept

◆ RollingAudioCaptureHold

friend class RollingAudioCaptureHold
friend

The documentation for this class was generated from the following file: