Skip to main content
Version: 2.x

Class MediaPipeline

Odin audio pipeline

Assembly: cs.temp.dll.dll
Declaration
public class MediaPipeline

Methods

GetEffects()

Get Pipeline effects collection

Declaration
public ILookup<uint, IPiplineEffect> GetEffects()
Returns

Odin.ILookup<System.UInt32,IPiplineEffect>: Get effects mapped by id### GetNextIndex() Calculate the next available index based on OdinNative.Wrapper.MediaPipeline._Effects entries

Declaration
public uint GetNextIndex()
Returns

System.UInt32: next available index### GetEffectCount() Get the current effect count of the native pipeline

Declaration
public uint GetEffectCount()
Returns

System.UInt32: count of native registered effects### GetEffectId(uint) Get the effect id of the native pipeline by index id

Declaration
public uint GetEffectId(uint indexId)
Returns

System.UInt32: effect id

Parameters
TypeNameDescription
System.UInt32indexIdindex id

AddApmEffect(uint, bool, OdinApmConfig)

Insert a apm effect and sets the apm config

Declaration
public ApmEffect AddApmEffect(uint samplerate, bool stereo, OdinApmConfig config)
Returns

Odin.ApmEffect: OdinNative.Wrapper.Media.ApmEffect instance of base OdinNative.Wrapper.Media.PiplineEffect : OdinNative.Wrapper.Media.IPiplineEffect

Parameters
TypeNameDescription
System.UInt32samplerateeffect playback samplerate
System.Booleanstereoeffect playback stereo
Odin.OdinApmConfigconfigconfiguration settings for apm

InsertApmEffect(uint, uint, bool)

Insert a apm effect to native pipeline

Declaration
public ApmEffect InsertApmEffect(uint indexId, uint samplerate, bool stereo)
Returns

Odin.ApmEffect: OdinNative.Wrapper.Media.ApmEffect

Parameters
TypeNameDescription
System.UInt32indexIdeffect index
System.UInt32samplerateeffect playback samplerate
System.Booleanstereoeffect playback stereo

AddCustomEffect<T>(PipelineCallback<T>, T)

Insert a custom effect and sets the OdinNative.Wrapper.Media.CustomEffect where T marks Serialize/Deserialize structures

Declaration
public CustomEffect<T> AddCustomEffect<T>(PipelineCallback<T> callback, T userData) where T : unmanaged
Returns

Odin.CustomEffect<<T>>: OdinNative.Wrapper.Media.CustomEffect instance of base OdinNative.Wrapper.Media.PiplineEffect : OdinNative.Wrapper.Media.IPiplineEffect

Parameters
TypeNameDescription
Odin.PipelineCallback<<T>>callbackeffect callback
<T>userDataeffect callback userdata of type T
Type Parameters
NameDescription
Tuserdata structure

InsertCustomEffect<T>(uint, OdinCustomEffectCallbackDelegate, IntPtr)

Insert a custom effect to native pipeline

Declaration
public CustomEffect<T> InsertCustomEffect<T>(uint indexId, OdinCustomEffectCallbackDelegate callback, IntPtr user_data) where T : unmanaged
Returns

Odin.CustomEffect<<T>>: OdinNative.Wrapper.Media.CustomEffect

Parameters
TypeNameDescription
System.UInt32indexIdeffect index
Odin.OdinCustomEffectCallbackDelegatecallbackeffect callback
Odin.IntPtruser_dataeffect callback userdata
Type Parameters
NameDescription
Tuserdata structure

AddVadEffect(out VadEffect)

Insert a vad effect

Declaration
public bool AddVadEffect(out VadEffect effect)
Returns

System.Boolean: OdinNative.Wrapper.Media.VadEffect instance of base OdinNative.Wrapper.Media.PiplineEffect : OdinNative.Wrapper.Media.IPiplineEffect

Parameters
TypeNameDescription
Odin.VadEffecteffectconfiguration settings for vad

InsertVadEffect(uint)

Insert a vad effect to native pipeline

Declaration
public VadEffect InsertVadEffect(uint indexId)
Returns

Odin.VadEffect: OdinNative.Wrapper.Media.VadEffect

Parameters
TypeNameDescription
System.UInt32indexIdeffect index

MoveEffect(uint, uint, ref uint)

Moves a effect in the native pipeline to a new index

Declaration
public bool MoveEffect(uint effectId, uint oldIndexId, ref uint newIndexId)
Returns

System.Boolean

Parameters
TypeNameDescription
System.UInt32effectIdnative effect id
System.UInt32oldIndexIdOdinNative.Wrapper.MediaPipeline._Effects index id
System.UInt32newIndexIdnative index id

RemoveEffect(uint)

Removes a effect from the native pipeline

Declaration
public bool RemoveEffect(uint effectId)
Returns

System.Boolean: true on removed or false

Parameters
TypeNameDescription
System.UInt32effectIdeffect id