Files
UnrealEngineUWP/Engine/Source/Runtime/SignalProcessing/Public/DSP/AlignedBuffer.h
marc audy bf460775cf Make AUDIO_BUFFER_ALIGNMENT definition consistent with AudioResampler.h changes in CL# 21463620
#rnx
[CODEREVIEW] phil.popp, nuno.leiria

[CL 21499916 by marc audy in ue5-main branch]
2022-08-22 21:21:16 -04:00

30 lines
1.0 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Containers/Array.h"
#include "Containers/ContainerAllocationPolicies.h"
// TODO: Move BufferVectorOperations AUDIO_BUFFER_ALIGNMENT
// define to more central location and reference here.
#define AUDIO_BUFFER_ALIGNMENT 16
#define AUDIO_SIMD_BYTE_ALIGNMENT (16)
#define AUDIO_NUM_FLOATS_PER_VECTOR_REGISTER (4)
namespace Audio
{
/** Aligned allocator used for fast operations. */
using FAudioBufferAlignedAllocator = TAlignedHeapAllocator<AUDIO_BUFFER_ALIGNMENT>;
using FAlignedByteBuffer = TArray<uint8, FAudioBufferAlignedAllocator>;
using FAlignedFloatBuffer = TArray<float, FAudioBufferAlignedAllocator>;
using FAlignedInt32Buffer = TArray<int32, FAudioBufferAlignedAllocator>;
// Deprecated in favor of versions above
typedef TArray<uint8, FAudioBufferAlignedAllocator> AlignedByteBuffer;
typedef TArray<float, FAudioBufferAlignedAllocator> AlignedFloatBuffer;
typedef TArray<int32, FAudioBufferAlignedAllocator> AlignedInt32Buffer;
}