DefaultAudioTrackBufferSizeProvider.Builder


class DefaultAudioTrackBufferSizeProvider.Builder


A builder to create DefaultAudioTrackBufferSizeProvider instances.

Summary

Public constructors

Creates a new builder.

Public functions

DefaultAudioTrackBufferSizeProvider!

Build the DefaultAudioTrackBufferSizeProvider.

DefaultAudioTrackBufferSizeProvider.Builder!

Sets the multiplication factor to apply to the passthrough buffer for AC3 to avoid underruns on some devices (e.g., Broadcom 7271).

DefaultAudioTrackBufferSizeProvider.Builder!
@CanIgnoreReturnValue
setDtshdBufferMultiplicationFactor(
    dtshdBufferMultiplicationFactor: Int
)

Sets the multiplication factor to apply to the passthrough buffer for DTS-HD (DTS Express) to avoid underruns.

DefaultAudioTrackBufferSizeProvider.Builder!

Sets the maximum length for PCM AudioTrack buffers, in microseconds.

DefaultAudioTrackBufferSizeProvider.Builder!

Sets the minimum length for PCM AudioTrack buffers, in microseconds.

DefaultAudioTrackBufferSizeProvider.Builder!

The length for offload AudioTrack buffers, in microseconds.

DefaultAudioTrackBufferSizeProvider.Builder!

Sets the length for passthrough AudioTrack buffers, in microseconds.

DefaultAudioTrackBufferSizeProvider.Builder!

Sets the multiplication factor to apply to the minimum buffer size requested.

Public constructors

Builder

Builder()

Creates a new builder.

Public functions

setAc3BufferMultiplicationFactor

@CanIgnoreReturnValue
fun setAc3BufferMultiplicationFactor(ac3BufferMultiplicationFactor: Int): DefaultAudioTrackBufferSizeProvider.Builder!

Sets the multiplication factor to apply to the passthrough buffer for AC3 to avoid underruns on some devices (e.g., Broadcom 7271). Default is AC3_BUFFER_MULTIPLICATION_FACTOR.

setDtshdBufferMultiplicationFactor

@CanIgnoreReturnValue
fun setDtshdBufferMultiplicationFactor(
    dtshdBufferMultiplicationFactor: Int
): DefaultAudioTrackBufferSizeProvider.Builder!

Sets the multiplication factor to apply to the passthrough buffer for DTS-HD (DTS Express) to avoid underruns. Default is DTSHD_BUFFER_MULTIPLICATION_FACTOR.

setMaxPcmBufferDurationUs

@CanIgnoreReturnValue
fun setMaxPcmBufferDurationUs(maxPcmBufferDurationUs: Int): DefaultAudioTrackBufferSizeProvider.Builder!

Sets the maximum length for PCM AudioTrack buffers, in microseconds. Default is MAX_PCM_BUFFER_DURATION_US.

setMinPcmBufferDurationUs

@CanIgnoreReturnValue
fun setMinPcmBufferDurationUs(minPcmBufferDurationUs: Int): DefaultAudioTrackBufferSizeProvider.Builder!

Sets the minimum length for PCM AudioTrack buffers, in microseconds. Default is MIN_PCM_BUFFER_DURATION_US.

setOffloadBufferDurationUs

@CanIgnoreReturnValue
fun setOffloadBufferDurationUs(offloadBufferDurationUs: Int): DefaultAudioTrackBufferSizeProvider.Builder!

The length for offload AudioTrack buffers, in microseconds. Default is OFFLOAD_BUFFER_DURATION_US.

setPassthroughBufferDurationUs

@CanIgnoreReturnValue
fun setPassthroughBufferDurationUs(passthroughBufferDurationUs: Int): DefaultAudioTrackBufferSizeProvider.Builder!

Sets the length for passthrough AudioTrack buffers, in microseconds. Default is PASSTHROUGH_BUFFER_DURATION_US.

setPcmBufferMultiplicationFactor

@CanIgnoreReturnValue
fun setPcmBufferMultiplicationFactor(pcmBufferMultiplicationFactor: Int): DefaultAudioTrackBufferSizeProvider.Builder!

Sets the multiplication factor to apply to the minimum buffer size requested. Default is PCM_BUFFER_MULTIPLICATION_FACTOR.