cohtml.AudioData

Contains audio stream data received from the cohtml native library.

Public Functions

Name
AudioData(int id, int channels, float samplingRate, CohtmlView view)
Creates an object containing audio stream data.
voidAutoPlay()
Configures the AudioSource component properties to support auto play when audio data is received.
voidSetVolume(float volume)
Sets the AudioSource’s volume.
voidStop()
Stops playing the AudioSource.
voidDestroy()
Destroys the AudioClip and AudioSource components
voidReceiveData(int samples, IntPtr pcm, int channels)
Receives audio stream data.

Public Attributes

Name
AudioSourceSource
Gets the AudioSource component

Public Functions Documentation

function AudioData

AudioData(
    int id,
    int channels,
    float samplingRate,
    CohtmlView view
)

Creates an object containing audio stream data.

function AutoPlay

void AutoPlay()

Configures the AudioSource component properties to support auto play when audio data is received.

function SetVolume

void SetVolume(
    float volume
)

Sets the AudioSource’s volume.

function Stop

void Stop()

Stops playing the AudioSource.

function Destroy

void Destroy()

Destroys the AudioClip and AudioSource components

function ReceiveData

void ReceiveData(
    int samples,
    IntPtr pcm,
    int channels
)

Receives audio stream data.

Public Attributes Documentation

variable Source

AudioSource Source => m_Source;

Gets the AudioSource component