Class OdinMedia
Wrapper class of OdinNative.Wrapper.MediaDecoder 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:
- OdinNative.Unity.OdinMedia.AddApm()Add
to the current GameObject - OdinNative.Unity.OdinMedia.AddVad()Add
to the current GameObject - OdinNative.Unity.OdinMedia.AddVolumeBoost()Add
to the current GameObject - OdinNative.Unity.OdinMedia.AddMute()Add
to the current GameObject
Assembly: cs.temp.dll.dll
Implements:
OdinNative.Wrapper.Media.IMedia
Properties
OutSampleRate
OutChannels
Gets the current speaker mode. Default is 2 channel stereo.
Parent
Id
MediaDecoder
Media reference
SpatialBlend
Property of AudioSource
RolloffMode
Property of AudioSource
MinDistance
Property of AudioSource
MaxDistance
Property of AudioSource
Activity
Media activity state flag
Fields
Playback
Actual Unity audio output component
AudioMixerGroup
Unity mixer
OnActiveStateChanged
Trigger on OdinNative.Unity.OdinMedia.Activity changed
AutoDestroyAudioSource
Flag for destroy OdinNative.Unity.OdinMedia.Playback linked AudioSource
AutoDestroyMediaStream
Flag for dispose of OdinNative.Unity.OdinMedia.MediaDecoder
Methods
GetPipeline()
Returns
Odin.MediaPipeline
AddApm()
Returns
Odin.OdinApmComponent
AddVad()
Returns
Odin.OdinVadComponent
AddVolumeBoost()
Returns
Odin.OdinVolumeBoostComponent
AddMute()
Returns
Odin.OdinMuteAudioComponent
AddEffect<T>()
Returns
<T>
Type Parameters
T
AddEffect<T>(T)
Returns
<T>
Parameters
Type | Name |
---|---|
<T> | effect |
Type Parameters
T
AddEffect<T>(UnityAction<OdinArrayf, bool, T>, T)
Returns
OdinNative.Wrapper.Media.CustomEffect<T>
Parameters
Type | Name |
---|---|
Odin.UnityAction<OdinArrayf,System.Boolean,<T>> | callback |
<T> | userData |
Type Parameters
T
SetDecoder(MediaDecoder)
Parameters
Type | Name |
---|---|
Odin.MediaDecoder | decoder |
ReadOdinAudioData()
GetFrameBufferSize()
Returns
System.Single
CheckResetFrameBuffer(float)
Parameters
Type | Name |
---|---|
System.Single | audioBufferSize |
SetAudioSourcePtich(float)
Parameters
Type | Name |
---|---|
System.Single | audioBufferSize |