UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
EarlyReflectionsFast.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "DSP/IntegerDelay.h"
8#include "DSP/LongDelayAPF.h"
11
12namespace Audio
13{
15 {
16 // Early reflections gain
17 float Gain;
18
19 // Delay between input signal and early reflections
21
22 // Input sample bandwidth before entering early reflections
23 float Bandwidth;
24
25 // Early reflections decay (lower value is longer)
26 float Decay;
27
28 // Early reflection high frequency absorption factor
30
32
34
36 };
37
38 // Basic implementation of early reflections using a predelay, low pass filter and feedback delay network (FDN). The FDN
39 // utilizes four delay lines where each delay line consists of an all pass filter and low pass filter to control diffusion
40 // and absorption.
42 {
43 public:
44
45 // Limits for settings
46 static SIGNALPROCESSING_API const float MaxGain;
47 static SIGNALPROCESSING_API const float MinGain;
52 static SIGNALPROCESSING_API const float MaxDecay;
53 static SIGNALPROCESSING_API const float MinDecay;
56
58
59 // InMaxNumInternalBufferSamples sets the maximum possible samples in an internal buffer.
62
63 // Sets the reverb settings, clamps, applies, and updates
65
66 // Process the single audio frame
68
69 // Silence internal audio.
71
72 // Clamps settings to acceptable values.
74
75 private:
76 void ApplySettings();
77
79 float SampleRate;
80
81 FAlignedFloatBuffer LeftInputBuffer;
82 FAlignedFloatBuffer LeftWorkBufferA;
83 FAlignedFloatBuffer LeftWorkBufferB;
84 FAlignedFloatBuffer RightInputBuffer;
85 FAlignedFloatBuffer RightWorkBufferA;
86 FAlignedFloatBuffer RightWorkBufferB;
87
88 FFDNCoefficients LeftCoefficients;
89 FFDNCoefficients RightCoefficients;
90
92 FFeedbackDelayNetwork RightFDN;
93
94 FIntegerDelay LeftPreDelay;
95 FIntegerDelay RightPreDelay;
96
97 FBufferOnePoleLPF LeftInputLPF;
98 FBufferOnePoleLPF RightInputLPF;
99 };
100}
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
Definition BufferOnePoleLPF.h:14
Definition EarlyReflectionsFast.h:42
static SIGNALPROCESSING_API const float MinPreDelay
Definition EarlyReflectionsFast.h:49
SIGNALPROCESSING_API void ProcessAudio(const FAlignedFloatBuffer &InSamples, const int32 InNumChannels, FAlignedFloatBuffer &OutLeftSamples, FAlignedFloatBuffer &OutRightSamples)
Definition EarlyReflectionsFast.cpp:158
static SIGNALPROCESSING_API const FEarlyReflectionsFastSettings DefaultSettings
Definition EarlyReflectionsFast.h:57
SIGNALPROCESSING_API void FlushAudio()
Definition EarlyReflectionsFast.cpp:224
static SIGNALPROCESSING_API const float MaxDecay
Definition EarlyReflectionsFast.h:52
static SIGNALPROCESSING_API const float MinBandwidth
Definition EarlyReflectionsFast.h:51
static SIGNALPROCESSING_API const float MaxPreDelay
Definition EarlyReflectionsFast.h:48
static SIGNALPROCESSING_API const float MaxAbsorption
Definition EarlyReflectionsFast.h:54
static SIGNALPROCESSING_API const float MaxGain
Definition EarlyReflectionsFast.h:46
static SIGNALPROCESSING_API void ClampSettings(FEarlyReflectionsFastSettings &InOutSettings)
Definition EarlyReflectionsFast.cpp:77
static SIGNALPROCESSING_API const float MinAbsorption
Definition EarlyReflectionsFast.h:55
static SIGNALPROCESSING_API const float MinGain
Definition EarlyReflectionsFast.h:47
SIGNALPROCESSING_API void SetSettings(const FEarlyReflectionsFastSettings &InSettings)
Definition EarlyReflectionsFast.cpp:101
static SIGNALPROCESSING_API const float MaxBandwidth
Definition EarlyReflectionsFast.h:50
static SIGNALPROCESSING_API const float MinDecay
Definition EarlyReflectionsFast.h:53
SIGNALPROCESSING_API ~FEarlyReflectionsFast()
Definition EarlyReflectionsFast.cpp:73
Definition FeedbackDelayNetwork.h:48
Definition IntegerDelay.h:15
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
Definition EarlyReflectionsFast.h:15
SIGNALPROCESSING_API bool operator==(const FEarlyReflectionsFastSettings &Other) const
Definition EarlyReflectionsFast.cpp:28
float Bandwidth
Definition EarlyReflectionsFast.h:23
float Gain
Definition EarlyReflectionsFast.h:17
SIGNALPROCESSING_API bool operator!=(const FEarlyReflectionsFastSettings &Other) const
Definition EarlyReflectionsFast.cpp:39
float Absorption
Definition EarlyReflectionsFast.h:29
float Decay
Definition EarlyReflectionsFast.h:26
float PreDelayMsec
Definition EarlyReflectionsFast.h:20
SIGNALPROCESSING_API FEarlyReflectionsFastSettings()
Definition EarlyReflectionsFast.cpp:20
Definition FeedbackDelayNetwork.h:33