|
JPL Spatial
Sound spatialization and propagation library
|
#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 |
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.
| JPL::ERBus::ERBus | ( | ) |
| JPL::ERBus::ERBus | ( | float | sampleRate, |
| uint32 | numChannels ) |
| JPL::ERBus::~ERBus | ( | ) |
|
inline |
|
inline |
| void JPL::ERBus::Prepare | ( | float | sampleRate, |
| uint32 | numChannels ) |
Must be called from a single non-audio thread before the audio thread begins calling 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().
| input | Interleaved source samples. |
| output | Interleaved output buffer to which the rendered reflections are added. Must contain the same number of frames as input. |
| numInputChannels | Number of channels in input. The number of channels in output must match the value passed to Prepare(). |
| numFrames | Number of frames in both buffers. |
| 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().