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)
 Must be called from non-RT thread.
 

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 
)

Must be called from audio thread. Number of input channels inferred from intput.size() / numFrames. Number of output channels inferred from output.size() / numFrames. Both channel counts must match what as passed to constructor.

@input and @output must have the same nubmer of frames

◆ UpdateParameters()

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

Must be called from non-RT thread.


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