Package com.opentok.android
Class BaseAudioDevice.AudioBus
java.lang.Object
com.opentok.android.BaseAudioDevice.AudioBus
- Enclosing class:
BaseAudioDevice
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
Modifier and TypeMethodDescriptionint
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.
-
Method Details
-
writeCaptureData
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
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
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
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.
-