IAudioEndpoint::PatchNewInput

Create a new patch point for this endpoint.

Windows
MacOS
Linux

References

Module

AudioExtensions

Header

/Engine/Source/Runtime/AudioExtensions/Public/IAudioEndpoint.h

Include

#include "IAudioEndpoint.h"

Source

/Engine/Source/Runtime/AudioExtensions/Private/IAudioEndpoint.cpp

Syntax

Audio::FPatchInput PatchNewInput
(
    float ExpectedDurationPerRender,
    float & OutSampleRate,
    int32 & OutNumChannels
)

Remarks

Create a new patch point for this endpoint. Please see MultithreadedPatching.h to see how to use the FPatchInput class.

Returns

a new Audio::FPatchInput. The FPatchInput may be disconnected if this endpoint's sample rate or channel count changes, in which case you will need to reconnect by calling this again.

Parameters

Parameter

Description

ExpectedDurationPerRender

The worst-case amount of time expected between render callbacks. This is used to determined how much to allocate for this input.

OutSampleRate.

The sample rate expected to be pushed to the returned FPatchInput. If you need to resample your input, please see Audio::FResampler.

OutNumChannels.

The number of channels expected to be pushed to the returned FPatchInput. If you need to downmix or upmix your input, try using the following: TArray MixdownGainsMap; Audio::FMixerDevice::Get2DChannelMap(false, NumInputChannels, NumOutputChannels, false, MixdownGainsMap); Audio::DownmixBuffer(NumInputChannels, NumOutputChannels, InputAudio, OutputAudio, MixdownGainsMap.GetData());

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss