UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LongDelayAPF.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"
8
9namespace Audio
10{
11 // All Pass Filter with a long delay. This filter is specifically designed for
12 // reverb applications where filter delay lines are long.
14 {
15 public:
16 // InG is the filter coefficient used in the long delay all pass filter.
17 // InNumDelaySamples is the delay line length in samples.
18 // InMaxNumInternalBufferSamples is the maximum internal block size used internally.
20
21 // Destructor
23
24 // Set the APF feedback/feedforward gain coefficient
25 void SetG(float InG) { G = InG; }
26
27 // Process InSamples and place filtered data in OutSamples
29
30 // Process Samples in place
32
33 // Process InSamples and place filtered data in OutSamples and delay line samples in OutDelaySamples.
34 // The OutDelaySamples correspond to "w[n] = InSamples[n] + InG * w[n - InDelay]"
36
37 // Sets delay line values to zero.
39
40 private:
41 // Performs all pass filtering on an audio block of BlockSize samples are less.
42 // InNum must be less than or equal to BlockSize.
43 SIGNALPROCESSING_API void ProcessAudioBlock(const float* InSamples, const float* InDelaySamples, const int32 InNum, float* OutSamples, float* OutDelaySamples);
44
45 SIGNALPROCESSING_API int32 GetNumInternalBufferSamples() const;
46
47 // Feedback/Feedforward gain coefficient
48 float G;
49
50 // Delay in samples
51 int32 NumDelaySamples;
52
53 // Buffer size for internal block processing.
54 int32 NumInternalBufferSamples;
55
56 // Buffer for block operations.
57 FAlignedFloatBuffer WorkBuffer;
58
59 // Filter delay line memory.
61 };
62
63}
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 LongDelayAPF.h:14
SIGNALPROCESSING_API void ProcessAudio(const FAlignedFloatBuffer &InSamples, FAlignedFloatBuffer &OutSamples)
Definition LongDelayAPF.cpp:65
SIGNALPROCESSING_API ~FLongDelayAPF()
Definition LongDelayAPF.cpp:35
SIGNALPROCESSING_API void Reset()
Definition LongDelayAPF.cpp:135
void SetG(float InG)
Definition LongDelayAPF.h:25
Definition UniquePtr.h:107
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53