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. | |
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. |
Public Attributes
Name | |
---|---|
AudioSource | Source 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