Class AudioRenderer
Utility component used to play audio frames obtained from a WebRTC audio source.
Namespace: Microsoft.MixedReality.WebRTC.Unity
Assembly: cs.temp.dll.dll
Syntax
public class AudioRenderer : MonoBehaviour
Remarks
Calling Start
The component will play only while enabled.
Fields
PadWithSine
If true, pad buffer underruns with a sine wave. This will cause artifacts on underruns. Use for debugging.
Declaration
public bool PadWithSine
Field Value
Type | Description |
---|---|
Boolean |
Methods
Awake()
Declaration
protected void Awake()
OnAudioFilterRead(Single[], Int32)
Declaration
protected void OnAudioFilterRead(float[] data, int channels)
Parameters
OnDestroy()
Declaration
protected void OnDestroy()
OnDisable()
Declaration
protected void OnDisable()
OnEnable()
Declaration
protected void OnEnable()
StartRendering(IAudioSource)
Start rendering the passed source.
Declaration
public void StartRendering(IAudioSource source)
Parameters
Type | Name | Description |
---|---|---|
IAudio |
source |
Remarks
Can be used to handle Audio
StopRendering(IAudioSource)
Stop rendering the passed source. Must be called with the same source passed to Start
Declaration
public void StopRendering(IAudioSource source)
Parameters
Type | Name | Description |
---|---|---|
IAudio |
source |
Remarks
Can be used to handle Audio