UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
BufferVectorOperations.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "DSP/AlignedBuffer.h"
6#include "Containers/Array.h"
8
9namespace Audio
10{
18 SIGNALPROCESSING_API void Apply2ChannelGain(float* RESTRICT StereoBuffer, int32 NumSamples, const float* RESTRICT Gains);
20 SIGNALPROCESSING_API void Apply2ChannelGain(float* RESTRICT StereoBuffer, int32 NumSamples, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
21
27 SIGNALPROCESSING_API void MixMonoTo2ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
29 SIGNALPROCESSING_API void MixMonoTo2ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
31 SIGNALPROCESSING_API void MixMonoTo2ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames);
32
38 SIGNALPROCESSING_API void Mix2ChannelsTo2ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT Gains);
39 SIGNALPROCESSING_API void Mix2ChannelsTo2ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
40 SIGNALPROCESSING_API void Mix2ChannelsTo2ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
41 SIGNALPROCESSING_API void Mix2ChannelsTo2ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
42
50
56 SIGNALPROCESSING_API void MixMonoTo4ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
58 SIGNALPROCESSING_API void MixMonoTo4ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
59
65 SIGNALPROCESSING_API void Mix2ChannelsTo4ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT Gains);
66 SIGNALPROCESSING_API void Mix2ChannelsTo4ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
67 SIGNALPROCESSING_API void Mix2ChannelsTo4ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
68 SIGNALPROCESSING_API void Mix2ChannelsTo4ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
69
77
83 SIGNALPROCESSING_API void MixMonoTo6ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
85 SIGNALPROCESSING_API void MixMonoTo6ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
86
92 SIGNALPROCESSING_API void Mix2ChannelsTo6ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT Gains);
93 SIGNALPROCESSING_API void Mix2ChannelsTo6ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
94 SIGNALPROCESSING_API void Mix2ChannelsTo6ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
95 SIGNALPROCESSING_API void Mix2ChannelsTo6ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
96
102
108 SIGNALPROCESSING_API void MixMonoTo8ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
110 SIGNALPROCESSING_API void MixMonoTo8ChannelsFast(const float* RESTRICT MonoBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
111
117 SIGNALPROCESSING_API void Mix2ChannelsTo8ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT Gains);
118 SIGNALPROCESSING_API void Mix2ChannelsTo8ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
119 SIGNALPROCESSING_API void Mix2ChannelsTo8ChannelsFast(const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
120 SIGNALPROCESSING_API void Mix2ChannelsTo8ChannelsFast(const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT StartGains, const float* RESTRICT EndGains);
121
125 SIGNALPROCESSING_API void DownmixBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, const float* RESTRICT Gains);
126 SIGNALPROCESSING_API void DownmixBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, const float* RESTRICT Gains);
127 SIGNALPROCESSING_API void DownmixBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const FAlignedFloatBuffer& SourceBuffer, FAlignedFloatBuffer& DestinationBuffer, float* RESTRICT StartGains, const float* RESTRICT EndGains);
128 SIGNALPROCESSING_API void DownmixBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const float* RESTRICT SourceBuffer, float* RESTRICT DestinationBuffer, int32 NumFrames, float* RESTRICT StartGains, const float* RESTRICT EndGains);
129
134 SIGNALPROCESSING_API void DownmixAndSumIntoBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const float* RESTRICT SourceBuffer, float* RESTRICT BufferToSumTo, int32 NumFrames, const float* RESTRICT Gains);
135
138
140 SIGNALPROCESSING_API void BufferInterleave2ChannelFast(const float* RESTRICT InBuffer1, const float* RESTRICT InBuffer2, float* RESTRICT OutBuffer, const int32 InNum);
141
144
147
150
153
181}
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
#define RESTRICT
Definition Platform.h:706
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
void Init()
Definition LockFreeList.h:4
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition BufferVectorOperations.h:156
SIGNALPROCESSING_API FBufferLinearEase()
Definition BufferVectorOperations.cpp:1301
SIGNALPROCESSING_API ~FBufferLinearEase()
Definition BufferVectorOperations.cpp:1307
SIGNALPROCESSING_API const FAlignedFloatBuffer & GetDeltaBuffer()
Definition BufferVectorOperations.cpp:1365
NO_LOGGING.
Definition AudioMixerPlatformAndroid.cpp:53
void MixMonoTo6ChannelsFast(const FAlignedFloatBuffer &MonoBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:571
void MixMonoTo8ChannelsFast(const FAlignedFloatBuffer &MonoBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:887
void BufferInterleave2ChannelFast(const FAlignedFloatBuffer &InBuffer1, const FAlignedFloatBuffer &InBuffer2, FAlignedFloatBuffer &OutBuffer)
Definition BufferVectorOperations.cpp:1172
void Apply6ChannelGain(FAlignedFloatBuffer &InterleavedBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:501
void Mix2ChannelsTo2ChannelsFast(const FAlignedFloatBuffer &SourceBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:210
void MixMonoTo2ChannelsFast(const FAlignedFloatBuffer &MonoBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:107
void Apply4ChannelGain(FAlignedFloatBuffer &InterleavedBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:307
void BufferSum2ChannelToMonoFast(const FAlignedFloatBuffer &InSamples, FAlignedFloatBuffer &OutSamples)
Definition BufferVectorOperations.cpp:1258
TArray< float, FAudioBufferAlignedAllocator > FAlignedFloatBuffer
Definition AlignedBuffer.h:22
void MixMonoTo4ChannelsFast(const FAlignedFloatBuffer &MonoBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:347
void Mix2ChannelsTo6ChannelsFast(const FAlignedFloatBuffer &SourceBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:673
void BufferDeinterleave2ChannelFast(const FAlignedFloatBuffer &InBuffer, FAlignedFloatBuffer &OutBuffer1, FAlignedFloatBuffer &OutBuffer2)
Definition BufferVectorOperations.cpp:1217
void Apply2ChannelGain(FAlignedFloatBuffer &StereoBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:67
void DownmixBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const FAlignedFloatBuffer &SourceBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:1083
void Mix2ChannelsTo4ChannelsFast(const FAlignedFloatBuffer &SourceBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:414
void DownmixAndSumIntoBuffer(int32 NumSourceChannels, int32 NumDestinationChannels, const FAlignedFloatBuffer &SourceBuffer, FAlignedFloatBuffer &BufferToSumTo, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:1147
void Mix2ChannelsTo8ChannelsFast(const FAlignedFloatBuffer &SourceBuffer, FAlignedFloatBuffer &DestinationBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:968
void Apply8ChannelGain(FAlignedFloatBuffer &InterleavedBuffer, const float *RESTRICT Gains)
Definition BufferVectorOperations.cpp:832