OpenTok.AudioDevice.AudioBus

public class AudioBus

Enclosing type: OpenTok.AudioDevice

An audio bus used for all publisher and subscribers. This class is used to both read and write audio samples in order for them to be rendered or sent to remote peers.

Methods

Name Description
ReadRenderData(buffer, numberOfSamples) → {int} Reads audio data from subscriber audio streams to be rendered.
WriteCaptureData(buffer, numberOfSamples) → {int} Writes audio data (to publishers) to be captured and sent in the audio stream.

ReadRenderData(buffer, numberOfSamples) → {int}

Reads audio data from subscriber audio streams to be rendered. This function will return immediately and will fill the provided buffer with the number of samples requested or the number of samples available in the internal buffer, whichever is lower. The function will return the actual number of samples copied into the provided buffer, which must be big enough to hold at least the number of samples requested.

.

Parameters:
Name Type Description
buffer IntPtr
numberOfSamples int
Returns:

int

WriteCaptureData(buffer, numberOfSamples) → {int}

Writes audio data (to publishers) to be captured and sent in the audio stream.

.

Parameters:
Name Type Description
buffer IntPtr
numberOfSamples int
Returns:

int