JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL::ERBus Class Reference

#include <JPLSpatial/Auralization/EarlyReflectionsBus.h>

Classes

struct  ERUpdateData
 

Public Member Functions

 ERBus ()
 
 ERBus (float sampleRate, uint32 numChannels)
 
 ~ERBus ()
 
void Prepare (float sampleRate, uint32 numChannels)
 
void ProcessInterleaved (std::span< const float > input, std::span< float > output, uint32 numInputChannels, uint32 numFrames)
 
uint32 GetNumChannels () const
 
void SetTaps (std::span< const ERUpdateData > newERs)
 
uint32 GetNumTaps () const
 

Detailed Description

Early Reflection Bus transfering ER data to audio rendering thread. It uses its own delay line with at least 2 seconds buffer space and performs rendering of early reflection using interpolating delay line taps, simulating propagation delay, applying pan and propagation filtering. The memory is managed by internal memory pool and default global JPL PMR allocator.

Constructor & Destructor Documentation

◆ ERBus() [1/2]

JPL::ERBus::ERBus ( )

◆ ERBus() [2/2]

JPL::ERBus::ERBus ( float sampleRate,
uint32 numChannels )

◆ ~ERBus()

JPL::ERBus::~ERBus ( )

Member Function Documentation

◆ GetNumChannels()

uint32 JPL::ERBus::GetNumChannels ( ) const
inline

◆ GetNumTaps()

uint32 JPL::ERBus::GetNumTaps ( ) const
inline

◆ Prepare()

void JPL::ERBus::Prepare ( float sampleRate,
uint32 numChannels )

Must be called from a single non-audio thread before the audio thread begins calling ProcessInterleaved().

◆ ProcessInterleaved()

void JPL::ERBus::ProcessInterleaved ( std::span< const float > input,
std::span< float > output,
uint32 numInputChannels,
uint32 numFrames )

Real-time safe. May be called from one audio thread after Prepare().

Parameters
inputInterleaved source samples.
outputInterleaved output buffer to which the rendered reflections are added. Must contain the same number of frames as input.
numInputChannelsNumber of channels in input. The number of channels in output must match the value passed to Prepare().
numFramesNumber of frames in both buffers.

◆ SetTaps()

void JPL::ERBus::SetTaps ( std::span< const ERUpdateData > newERs)

Add/remove/update early reflection taps Must be called from the same non-audio thread. May run concurrently with ProcessInterleaved().


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