Class OdinCustomEffectUnityComponentBase<U>
Custom base component for OdinNative.Wrapper.Media.CustomEffect
This convenient class provides effect template with a passthrough of custom userdata on a callback. The abstract representation of a base custom effect is to simplify implementation of OdinNative.Unity.Audio.IOdinEffect as a Unity component. (see other predefined custom effects)
Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour
Derived:
OdinNative.Unity.Audio.OdinColliderFilterComponent, OdinNative.Unity.Audio.OdinECLoopbackComponent, OdinNative.Unity.Audio.OdinMuteAudioComponent, OdinNative.Unity.Audio.OdinRmsComponent, OdinNative.Unity.Audio.OdinTerrainFilterComponent, OdinNative.Unity.Audio.OdinVolumeBoostComponent, OdinNative.Unity.Audio.OdinVolumeComponent
Implements:
OdinNative.Unity.Audio.IOdinEffect
Properties
Media
Get Media
Effect
Get base effect
IsCreated
Flag if the effect was added to the pipeline
IsEnabled
Flag if the component is active or use isActiveAndEnabled
Fields
UnityQueue
DestroyOnError
_warn
_corrupt
Methods
OnEnable()
Reset()
Start()
Update()
OnDisable()
GetEffectUserData()
Get userdata used for the OdinNative.Unity.Audio.OdinCustomEffectUnityComponentBase
Returns
<U>: effect userdata
CustomEffectCallback(OdinTArray<float>, ref bool, U)
Callback delegate for the effect
Parameters
| Type | Name | Description |
|---|---|---|
| OdinNative.Core.Imports.NativeBindings.OdinTArray<T> | audio | audio data wrapper for copy buffer to native |
System.Boolean | isSilent | flag whether the buffer contains silence, can be set to mute the frame |
<U> | _ | effect userdata, see OdinNative.Unity.Audio.OdinCustomEffectUnityComponentBase |
ResetEffect()
Removes an effect from the pipeline and add a new effect with callbacks
ClearEffect()
Removes the effect from the pipeline it was created on, if that pipeline is still alive
OnDestroy()
GetMedia<T>()
Get Media
Returns
<T>: Media
Type Parameters
T
GetEffect()
Get custom effect
Returns
OdinNative.Wrapper.Media.PipelineEffect: custom effect