기술 자료

Unity Engine

Unity Engine

AllocateEffect<TProcessor, TControl>(in TProcessor, in TControl, AudioFormat?, in CreationParameters)

Allocate an EffectInstance with the specified processor and control state.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

AllocateEffect<T, U>(T, T, AudioFormat?, CreationParameters)

public readonly EffectInstance AllocateEffect<TProcessor, TControl>(in TProcessor processorState, in TControl controlState, AudioFormat? nestedFormat = null, in EffectInstance.CreationParameters creationParameters = default) where TProcessor : unmanaged, EffectInstance.IRealtime where TControl : unmanaged, EffectInstance.IControl<TProcessor>

Parameters

processorState

T
The initial state available from the realtime thread.

controlState

T
The initial state available from the control thread.

nestedFormat

If not null, the returned EffectInstance will be treated as nested and use this format.

creationParameters

Additional parameters and initialization state for the processor. This is generally received from IAudioEffect.CreateInstance

Returns

Type

Description

EffectInstanceAn EffectInstance you own and control, that must later be destroyed with ControlContext.Destroy.

Remarks

This can generally be used to process the audio of an IAudioEffect, potentially from within another processor.
Additional Resources: IAudioEffect.CreateInstance