|
JPL Spatial
Sound spatialization and propagation library
|
#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. | |
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.
| JPL::DirectSoundEffect::DirectSoundEffect | ( | float | sampleRate, |
| uint32 | numSourceChannels, | ||
| uint32 | numOutputChannels, | ||
| const simd | initialFilterGains, | ||
| float | initialDelayTimeInSeconds, | ||
| std::span< const float > | initialMixMap | ||
| ) |
| JPL::DirectSoundEffect::~DirectSoundEffect | ( | ) |
| 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
| void JPL::DirectSoundEffect::UpdateParameters | ( | const simd & | filterGains, |
| float | delayTimeSeconds, | ||
| std::span< const float > | channelMixMap | ||
| ) |
Must be called from non-RT thread.