Developer Documentation
Our new developer documentation is now available. Please check it out!

OdinMedia

public class OdinMedia : MonoBehaviour, IMedia

Wrapper class of Odin for Unity (require AudioSource)

This convenient class provides predefined helper functions to cover for a default usecases where the voice chat needs to work with AudioSource, AudioClip, AudioMixer, ...

Default Unity GameObject altering functions:
  • OdinMediaAdd OdinMuteAudioComponent to the current GameObject

Properties

NameDescription
PlaybackActual Unity audio output component
OutSampleRate
OutChannelsGets the current speaker mode. Default is 2 channel stereo.
Parent
Id
MediaDecoderMedia reference
AudioMixerGroupUnity mixer
SpatialBlendProperty of AudioSource
RolloffModeProperty of AudioSource
MinDistanceProperty of AudioSource
MaxDistanceProperty of AudioSource
ActivityMedia activity state flag
OnActiveStateChangedTrigger on Activity changed
AutoDestroyAudioSourceFlag for destroy Playback linked AudioSource
AutoDestroyMediaStreamFlag for dispose of MediaDecoder

Public Methods

NameDescription
GetPipeline
AddApm
AddVad
AddVolumeBoost
AddMute
AddEffect
SetDecoder
ReadOdinAudioData
GetFrameBufferSize
CheckResetFrameBuffer
SetAudioSourcePtich
SetAudioClipData