Skip to main content
Version: 2.x

Class OdinVolumeBoostComponent

Custom volume scale component for OdinNative.Wrapper.Media.CustomEffect

This class is an effect in the odin audio pipeline to scale each sample individually in the buffer.

Declaration
[HelpURL("https://docs.4players.io/voice/unity/next/api/OdinNative.Unity.Audio/OdinVolumeBoostComponent/")]
[AddComponentMenu("Odin/Audio/Effect/Volume boost")]
public class OdinVolumeBoostComponent : OdinCustomEffectUnityComponentBase<nint>, IOdinEffect

Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour -> OdinNative.Unity.Audio.OdinCustomEffectUnityComponentBase<U>

Implements:
OdinNative.Unity.Audio.IOdinEffect

Fields

ExponentOfScale

Declaration
[Tooltip("Base exponent is 1.0f and will be distorted if the exponent is too high. (Default: 2.0f ^ 1.0f)")]
public float ExponentOfScale

Scale

Declaration
[Tooltip("Base scale is 2.0f and will be distorted if the value is too high. (Default: 2.0f ^ 1.0f)")]
public float Scale

Methods

CustomEffectCallback(OdinTArray<float>, ref bool, nint)

Callback delegate for the effect

Declaration
public override void CustomEffectCallback(NativeBindings.OdinTArray<float> audio, ref bool isSilent, nint _)
Parameters
TypeNameDescription
OdinNative.Core.Imports.NativeBindings.OdinTArray<T>audioaudio data wrapper for copy buffer to native
System.BooleanisSilentflag whether the buffer contains silence, can be set to mute the frame
System.IntPtr_effect userdata, see OdinNative.Unity.Audio.OdinCustomEffectUnityComponentBase

Implements