engine
 
载入中...
搜索中...
未找到
类 | Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
Audio::FBaseChannelFormatConverter类 参考

FBaseChannelFormatConverter implements channel conversion using a simple mixing matrix. 更多...

#include <AudioChannelFormatConverter.h>

+ 类 Audio::FBaseChannelFormatConverter 继承关系图:

类

struct  FChannelMixEntry
 FChannelMixEntry denotes how an input channel should be mixed into an output channel. 更多...
 

Public 成员函数

const FInputFormat & GetInputFormat () const override
 Return the input format handled by this converter.
 
const FOutputFormat & GetOutputFormat () const override
 Return the output format handled by this converter.
 
float GetTargetMixGain (int32 InInputChannelIndex, int32 InOutputChannelIndex) const
 Returns the scalar gain used to mix the input channel index into the output channel index. 更多...
 
float GetTargetOutputGain () const
 Returns the scalar gain applied to the output audio. 更多...
 
void ProcessAudio (const TArray< AlignedFloatBuffer > &InInputBuffers, TArray< AlignedFloatBuffer > &OutOutputBuffers) override
 Converter the audio format from the FInputFormat to the FOutputFormat. 更多...
 
void SetMixGain (const FChannelMixEntry &InEntry, bool bFadeToGain=true)
 Sets the gain scalar to apply to a specific input/output channel pair. 更多...
 
void SetMixGain (int32 InInputChannelIndex, int32 InOutputChannelIndex, float InGain, bool bFadeToGain=true)
 Sets the gain scalar to apply to a specific input/output channel pair. 更多...
 
void SetOutputGain (float InOutputGain, bool bFadeToGain=true)
 Sets the output gain scalar to apply to all output audio. 更多...
 
virtual const FInputFormat & GetInputFormat () const =0
 Return the input format handled by this converter.
 
virtual const FOutputFormat & GetOutputFormat () const =0
 Return the output format handled by this converter.
 
virtual void ProcessAudio (const TArray< AlignedFloatBuffer > &InInputBuffers, TArray< AlignedFloatBuffer > &OutOutputBuffers)=0
 Converter the audio format from the FInputFormat to the FOutputFormat. 更多...
 

静态 Public 成员函数

static TUniquePtr< FBaseChannelFormatConverter > CreateBaseFormatConverter (const FInputFormat &InInputFormat, const FOutputFormat &InOutputFormat, TArrayView< const FChannelMixEntry > InMixEntries, int32 InNumFramesPerCall)
 Create a FBaseChannelFormatConverter 更多...
 

详细描述

FBaseChannelFormatConverter implements channel conversion using a simple mixing matrix.

成员函数说明

◆ CreateBaseFormatConverter()

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

Create a FBaseChannelFormatConverter

参数
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.
返回
A TUniquePtr to a FBaseChannelFormatConverter.

◆ 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< AlignedFloatBuffer > &  InInputBuffers,
TArray< AlignedFloatBuffer > &  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.

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

实现了 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.

参数
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.

参数
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.

参数
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.

该类的文档由以下文件生成: