java.lang.Object

com.opentok.android.BaseAudioDevice.AudioBus

Enclosing class: : BaseAudioDevice


public static class BaseAudioDevice.AudioBus extends Object

The audio bus marshals audio data between the network and the audio device. Call the BaseAudioDevice.getAudioBus() method to get the AudioBus object for the audio device. The audio device pushes captured audio samples to and fetches unrendered audio samples from the audio bus.

Method Summary

All MethodsInstance MethodsConcrete Methods

Modifier and Type

Method

Description

int

readRenderData(ByteBuffer data, int numberOfSamples)

Retrieves unrendered audio samples from the session.

int

readRenderData(ShortBuffer data, int numberOfSamples)

Retrieves unrendered audio samples from the session.

void

writeCaptureData(ByteBuffer data, int numberOfSamples)

Passes audio data to transmit to a session.

void

writeCaptureData(ShortBuffer data, int numberOfSamples)

Passes audio data to transmit to a session.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

writeCaptureData

public void writeCaptureData(ByteBuffer data, int numberOfSamples)

Passes audio data to transmit to a session.

Parameters: : data - The byte buffer containing audio data. : numberOfSamples - The number of samples available for copying.

writeCaptureData

public void writeCaptureData(ShortBuffer data, int numberOfSamples)

Passes audio data to transmit to a session.

Parameters: : data - The byte buffer containing audio data. : numberOfSamples - The number of samples available for copying.

readRenderData

public int readRenderData(ByteBuffer data, int numberOfSamples)

Retrieves unrendered audio samples from the session. This is most commonly used to send audio to the speakers, but is also an entry point for further audio processing.

Parameters: : data - The byte buffer containing audio data. : numberOfSamples - The number of samples requested.

Returns: : uint32_t The number of samples copied out of the audio buffer.

readRenderData

public int readRenderData(ShortBuffer data, int numberOfSamples)

Retrieves unrendered audio samples from the session. This is most commonly used to send audio to the speakers, but is also an entry point for further audio processing.

Parameters: : data - The byte buffer containing audio data. : numberOfSamples - The number of samples requested.

Returns: : uint32_t The number of samples copied out of the audio buffer.