Skip to content
SiteEmail

cohtml.AudioData

Contains audio stream data received from the cohtml native library.

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.
Name
AudioSourceSource
Gets the AudioSource component
AudioData(
int id,
int channels,
float samplingRate,
CohtmlView view
)

Creates an object containing audio stream data.

void AutoPlay()

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

void SetVolume(
float volume
)

Sets the AudioSource’s volume.

void Stop()

Stops playing the AudioSource.

void Destroy()

Destroys the AudioClip and AudioSource components

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

Receives audio stream data.

AudioSource Source => m_Source;

Gets the AudioSource component