BaseAudioDevice.AudioBus
public static class 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.
Methods
| Name | Description |
|---|---|
readRenderData(data, numberOfSamples) → {int} |
Retrieves unrendered audio samples from the session. |
readRenderData(data, numberOfSamples) → {int} |
Retrieves unrendered audio samples from the session. |
writeCaptureData(data, numberOfSamples) |
Passes audio data to transmit to a session. |
writeCaptureData(data, numberOfSamples) |
Passes audio data to transmit to a session. |
readRenderData(data, numberOfSamples) → {int}
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:
| Name | Type | Description |
|---|---|---|
data |
ByteBuffer | The byte buffer containing audio data. |
numberOfSamples |
int | The number of samples requested. |
Returns:
uint32_t The number of samples copied out of the audio buffer.
readRenderData(data, numberOfSamples) → {int}
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:
| Name | Type | Description |
|---|---|---|
data |
ShortBuffer | The byte buffer containing audio data. |
numberOfSamples |
int | The number of samples requested. |
Returns:
uint32_t The number of samples copied out of the audio buffer.
writeCaptureData(data, numberOfSamples)
Passes audio data to transmit to a session.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
ByteBuffer | The byte buffer containing audio data. |
numberOfSamples |
int | The number of samples available for copying. |
writeCaptureData(data, numberOfSamples)
Passes audio data to transmit to a session.
Parameters:
| Name | Type | Description |
|---|---|---|
data |
ShortBuffer | The byte buffer containing audio data. |
numberOfSamples |
int | The number of samples available for copying. |