-
- All Implemented Interfaces:
-
io.livekit.android.audio.AudioBufferCallback
public abstract class MixerAudioBufferCallback implements AudioBufferCallback
A convenience class that handles mixing the microphone data and custom audio data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMixerAudioBufferCallback.BufferResponse
-
Constructor Summary
Constructors Constructor Description MixerAudioBufferCallback()
-
Method Summary
Modifier and Type Method Description final LongonBuffer(ByteBuffer buffer, Integer audioFormat, Integer channelCount, Integer sampleRate, Integer bytesRead, Long captureTimeNs)Called when new audio samples are ready. abstract MixerAudioBufferCallback.BufferResponseonBufferRequest(ByteBuffer originalBuffer, Integer audioFormat, Integer channelCount, Integer sampleRate, Integer bytesRead, Long captureTimeNs)-
-
Method Detail
-
onBuffer
final Long onBuffer(ByteBuffer buffer, Integer audioFormat, Integer channelCount, Integer sampleRate, Integer bytesRead, Long captureTimeNs)
Called when new audio samples are ready.
- Parameters:
buffer- the buffer of audio bytes.audioFormat- the audio encoding.bytesRead- the byte count originally read from the microphone.captureTimeNs- the capture timestamp of the original audio data in nanoseconds.
-
onBufferRequest
abstract MixerAudioBufferCallback.BufferResponse onBufferRequest(ByteBuffer originalBuffer, Integer audioFormat, Integer channelCount, Integer sampleRate, Integer bytesRead, Long captureTimeNs)
-
-
-
-