UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Audio::FBaseChannelFormatConverter Class Reference

#include <AudioChannelFormatConverter.h>

+ Inheritance diagram for Audio::FBaseChannelFormatConverter:

Classes

struct  FChannelMixEntry
 

Public Member Functions

virtual SIGNALPROCESSING_API ~FBaseChannelFormatConverter ()
 
SIGNALPROCESSING_API const FInputFormatGetInputFormat () const override
 
SIGNALPROCESSING_API const FOutputFormatGetOutputFormat () const override
 
SIGNALPROCESSING_API void SetOutputGain (float InOutputGain, bool bFadeToGain=true)
 
SIGNALPROCESSING_API void SetMixGain (const FChannelMixEntry &InEntry, bool bFadeToGain=true)
 
SIGNALPROCESSING_API void SetMixGain (int32 InInputChannelIndex, int32 InOutputChannelIndex, float InGain, bool bFadeToGain=true)
 
SIGNALPROCESSING_API float GetTargetMixGain (int32 InInputChannelIndex, int32 InOutputChannelIndex) const
 
SIGNALPROCESSING_API float GetTargetOutputGain () const
 
SIGNALPROCESSING_API void ProcessAudio (const TArray< FAlignedFloatBuffer > &InInputBuffers, TArray< FAlignedFloatBuffer > &OutOutputBuffers) override
 
- Public Member Functions inherited from Audio::IChannelFormatConverter
virtual ~IChannelFormatConverter ()=default
 

Static Public Member Functions

static SIGNALPROCESSING_API TUniquePtr< FBaseChannelFormatConverterCreateBaseFormatConverter (const FInputFormat &InInputFormat, const FOutputFormat &InOutputFormat, TArrayView< const FChannelMixEntry > InMixEntries, int32 InNumFramesPerCall)
 

Protected Member Functions

SIGNALPROCESSING_API FBaseChannelFormatConverter (const FInputFormat &InInputFormat, const FOutputFormat &InOutputFormat, TArrayView< const FChannelMixEntry > InMixEntries, int32 InNumFramesPerCall)
 

Detailed Description

FBaseChannelFormatConverter implements channel conversion using a simple mixing matrix.

Constructor & Destructor Documentation

◆ ~FBaseChannelFormatConverter()

Audio::FBaseChannelFormatConverter::~FBaseChannelFormatConverter ( )
virtualdefault

◆ FBaseChannelFormatConverter()

Audio::FBaseChannelFormatConverter::FBaseChannelFormatConverter ( const FInputFormat InInputFormat,
const FOutputFormat InOutputFormat,
TArrayView< const FChannelMixEntry InMixEntries,
int32  InNumFramesPerCall 
)
protected

Member Function Documentation

◆ CreateBaseFormatConverter()

TUniquePtr< FBaseChannelFormatConverter > Audio::FBaseChannelFormatConverter::CreateBaseFormatConverter ( const FInputFormat InInputFormat,
const FOutputFormat InOutputFormat,
TArrayView< const FChannelMixEntry InMixEntries,
int32  InNumFramesPerCall 
)
static

Create a FBaseChannelFormatConverter

Parameters
InInputFormat- The format of the input audio.
InOutputFormat- The desired output audio format.
InMixEntries- An array of mixing values to use to mix input audio to output audio.
InNumFramesPerCall- The number of frames used for each call to ProcessAudio.
Returns
A TUniquePtr to a FBaseChannelFormatConverter.

◆ GetInputFormat()

const IChannelFormatConverter::FInputFormat & Audio::FBaseChannelFormatConverter::GetInputFormat ( ) const
overridevirtual

Return the input format handled by this converter.

Implements Audio::IChannelFormatConverter.

◆ GetOutputFormat()

const IChannelFormatConverter::FOutputFormat & Audio::FBaseChannelFormatConverter::GetOutputFormat ( ) const
overridevirtual

Return the output format handled by this converter.

Implements Audio::IChannelFormatConverter.

◆ GetTargetMixGain()

float Audio::FBaseChannelFormatConverter::GetTargetMixGain ( int32  InInputChannelIndex,
int32  InOutputChannelIndex 
) const

Returns the scalar gain used to mix the input channel index into the output channel index.

If the gains are to be faded during the subsequent call to ProcessAudio(), this will return the ending gain.

◆ GetTargetOutputGain()

float Audio::FBaseChannelFormatConverter::GetTargetOutputGain ( ) const

Returns the scalar gain applied to the output audio.

If the gain is to be faded during the subsequent call to ProcessAudio(), this will return the ending gain.

◆ ProcessAudio()

void Audio::FBaseChannelFormatConverter::ProcessAudio ( const TArray< FAlignedFloatBuffer > &  InInputBuffers,
TArray< FAlignedFloatBuffer > &  OutOutputBuffers 
)
overridevirtual

Converter the audio format from the FInputFormat to the FOutputFormat.

The input buffer array must have the same number of channels as the FInputFormat return from GetInputFormat(). Each buffer within that array must have InNumFramesPerCall as set on creation.

Parameters
InInputBuffers- An array of input audio buffers.
OutOutputBuffers- An array of buffers where output audio is stored.

Implements Audio::IChannelFormatConverter.

◆ SetMixGain() [1/2]

void Audio::FBaseChannelFormatConverter::SetMixGain ( const FChannelMixEntry InEntry,
bool  bFadeToGain = true 
)

Sets the gain scalar to apply to a specific input/output channel pair.

Parameters
InMixEntry- Description of mix routing and gain.
bFadeToGain- If true, gain values are linearly faded over the duration of a single buffer. If false, gain values are applied immediately.

◆ SetMixGain() [2/2]

void Audio::FBaseChannelFormatConverter::SetMixGain ( int32  InInputChannelIndex,
int32  InOutputChannelIndex,
float  InGain,
bool  bFadeToGain = true 
)

Sets the gain scalar to apply to a specific input/output channel pair.

Parameters
InInputChannelIndex- The index of the source channel audio.
InOutputChannelIndex- The index of the destination channel audio.
InGain- The scalar gain to apply to the source channel before adding it to the destination channel.
bFadeToGain- If true, gain values are linearly faded over the duration of a single buffer. If false, gain values are applied immediately.

◆ SetOutputGain()

void Audio::FBaseChannelFormatConverter::SetOutputGain ( float  InOutputGain,
bool  bFadeToGain = true 
)

Sets the output gain scalar to apply to all output audio.

Parameters
InOutputGain- Scalar gain value.
bFadeToGain- If true, gain values are linearly faded over the duration of a single buffer. If false, gain values are applied immediately.

The documentation for this class was generated from the following files: