Class OdinDecoder
Wrapper class of OdinNative.Wrapper.MediaDecoder for Unity (requires AudioSource)
This convenient class provides predefined helper functions to cover default use cases where the voice chat needs to work with AudioSource, AudioClip, AudioMixer, ...
Default Unity GameObject altering functions:
- OdinNative.Unity.OdinDecoder.AddApm()Add OdinNative.Unity.Audio.OdinApmComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddVad()Add OdinNative.Unity.Audio.OdinVadComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddVi()Add OdinNative.Unity.Audio.OdinViComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddVolumeBoost()Add OdinNative.Unity.Audio.OdinVolumeBoostComponent to the current GameObject
- OdinNative.Unity.OdinDecoder.AddMute()Add OdinNative.Unity.Audio.OdinMuteAudioComponent to the current GameObject
Inheritance: System.Object -> UnityEngine.Object -> UnityEngine.Component -> UnityEngine.Behaviour -> UnityEngine.MonoBehaviour
Implements:
OdinNative.Wrapper.Media.IMedia
Properties
OutSampleRate
Playback samplerate reported by Unity, or OdinNative.Unity.OdinRoom.DefaultSampleRate when the Unity audio engine is disabled.
OutChannels
Gets the playback channel count derived from AudioSettings.speakerMode, clamped to stereo (1 or 2).
Parent
The peer that owns this decoder. Set by OdinNative.Unity.OdinPeer.AddDecoderComponent(UnityEngine.GameObject,System.UInt64,System.Boolean) and used as the
abstraction boundary — allows swapping the native wrapper for a web bridge without changing SDK components.
Id
Odin media id
MediaDecoder
Media reference