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

#include <JPLSpatial/Auralization/DirectSound.h>

Public Member Functions

 DirectSoundEffect (float sampleRate, uint32 numSourceChannels, uint32 numOutputChannels, const simd initialFilterGains, float initialDelayTimeInSeconds, std::span< const float > initialMixMap)
 
 ~DirectSoundEffect ()
 
void ProcessInterleaved (std::span< const float > input, std::span< float > output, uint32 numFrames)
 
void UpdateParameters (const simd &filterGains, float delayTimeSeconds, std::span< const float > channelMixMap)
 

Detailed Description

Direct Sound Effect Bus transfering direct sound propagaion data to audio rendering thread. It uses its own delay line with at least 2 seconds buffer space and performs rendering of the direct sound using interpolating delay line taps, simulating propagation delay, applying pan and propagation filtering. The memory is managed by the default global JPL PMR allocator.

Constructor & Destructor Documentation

◆ DirectSoundEffect()

JPL::DirectSoundEffect::DirectSoundEffect ( float sampleRate,
uint32 numSourceChannels,
uint32 numOutputChannels,
const simd initialFilterGains,
float initialDelayTimeInSeconds,
std::span< const float > initialMixMap )

◆ ~DirectSoundEffect()

JPL::DirectSoundEffect::~DirectSoundEffect ( )

Member Function Documentation

◆ ProcessInterleaved()

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

Real-time safe. May be called from one audio thread after construction. Number of input channels inferred from input.size() / numFrames. Number of output channels inferred from output.size() / numFrames. Both channel counts must match what was passed to the constructor.

Parameters
inputInterleaved source samples.
outputInterleaved output buffer. Must contain the same number of frames as input.
numFramesNumber of frames in both buffers.

◆ UpdateParameters()

void JPL::DirectSoundEffect::UpdateParameters ( const simd & filterGains,
float delayTimeSeconds,
std::span< const float > channelMixMap )

Must be called from a single non-audio thread. May run concurrently with ProcessInterleaved().


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