Skip to main content
Version: 2.x

Class MediaPipeline

Odin audio pipeline

Declaration
public class MediaPipeline

Methods

GetEffects()

Get Pipeline effects collection

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

System.Linq.ILookup<System.UInt32,OdinNative.Wrapper.Media.IPipelineEffect>: Get effects mapped by id

InsertEffect(IPipelineEffect)

Declaration
public void InsertEffect(IPipelineEffect effect)
Parameters
TypeName
OdinNative.Wrapper.Media.IPipelineEffecteffect

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 an APM effect and sets the apm config

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

OdinNative.Wrapper.Media.ApmEffect: OdinNative.Wrapper.Media.ApmEffect instance of base OdinNative.Wrapper.Media.PipelineEffect : OdinNative.Wrapper.Media.IPipelineEffect

Parameters
TypeNameDescription
System.UInt32samplerateeffect playback samplerate
System.Booleanstereoeffect playback stereo
OdinNative.Core.Imports.NativeBindings.OdinApmConfigconfigconfiguration settings for apm

InsertApmEffect(uint, uint, bool)

Insert an APM effect to native pipeline

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

OdinNative.Wrapper.Media.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>(NativeBindings.PipelineCallback<T> callback, T userData) where T : unmanaged
Returns

OdinNative.Wrapper.Media.CustomEffect<T>: OdinNative.Wrapper.Media.CustomEffect instance of base OdinNative.Wrapper.Media.PipelineEffect : OdinNative.Wrapper.Media.IPipelineEffect

Parameters
TypeNameDescription
OdinNative.Core.Imports.NativeBindings.PipelineCallback<T>callbackeffect callback
<T>userDataeffect callback userdata of type T
Type Parameters
NameDescription
Tuserdata structure

InsertCustomEffect<T>(uint, OdinCustomEffectCallbackDelegate, nint)

Insert a custom effect to native pipeline

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

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

Parameters
TypeNameDescription
System.UInt32indexIdeffect index
OdinNative.Core.Imports.NativeLibraryMethods.OdinCustomEffectCallbackDelegatecallbackeffect callback
System.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: true on success or false

Parameters
TypeNameDescription
OdinNative.Wrapper.Media.VadEffecteffectcreated OdinNative.Wrapper.Media.VadEffect instance or null

InsertVadEffect(uint)

Insert a vad effect to native pipeline

Declaration
public VadEffect InsertVadEffect(uint indexId)
Returns

OdinNative.Wrapper.Media.VadEffect: OdinNative.Wrapper.Media.VadEffect

Parameters
TypeNameDescription
System.UInt32indexIdeffect index

AddViEffect(out ViEffect)

Insert a vi effect

Declaration
public bool AddViEffect(out ViEffect effect)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
OdinNative.Wrapper.Media.ViEffecteffectcreated OdinNative.Wrapper.Media.ViEffect instance or null

InsertViEffect(uint)

Insert a vi effect to native pipeline

Declaration
public ViEffect InsertViEffect(uint indexId)
Returns

OdinNative.Wrapper.Media.ViEffect: OdinNative.Wrapper.Media.ViEffect

Parameters
TypeNameDescription
System.UInt32indexIdeffect index

MoveEffect(uint, uint, ref uint)

Moves an effect in the native pipeline to a new index

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

System.Boolean: true on success or false

Parameters
TypeNameDescription
System.UInt32effectIdnative effect id
System.UInt32oldIndexIdcurrently unused
System.UInt32newIndexIdnative index id

RemoveEffect(uint)

Removes an effect from the native pipeline

Declaration
public bool RemoveEffect(uint effectId)
Returns

System.Boolean: true on removed or false

Parameters
TypeNameDescription
System.UInt32effectIdeffect id