AllocateEffect<TProcessor, TControl>(in TProcessor, in TControl, AudioFormat?, in CreationParameters)
Allocate an EffectInstance with the specified processor and control state.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Audio
- Assembly: UnityEngine.AudioModule
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
If not null, the returned EffectInstance will be treated as nested and use this format.
Additional parameters and initialization state for the processor. This is generally received from IAudioEffect.CreateInstance
Returns
Type | Description |
|---|---|
| EffectInstance | An 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