AudioEncoderSettings.Builder


class AudioEncoderSettings.Builder


Builds AudioEncoderSettings instances.

Summary

Public constructors

Creates a new instance.

Public constructors

Builder

Builder()

Creates a new instance.

Public functions

build

fun build(): AudioEncoderSettings!

Builds the instance.

setBitrate

@CanIgnoreReturnValue
fun setBitrate(bitrate: Int): AudioEncoderSettings.Builder!

Sets the bitrate.

The default value is NO_VALUE.

The encoder may ignore the requested bitrate to improve the encoding quality.

Parameters
bitrate: Int

The bitrate in bits per second.

Returns
AudioEncoderSettings.Builder!

This builder.

setProfile

@CanIgnoreReturnValue
fun setProfile(profile: Int): AudioEncoderSettings.Builder!

Sets the profile.

The default value is NO_VALUE and the appropriate profile will be used automatically.

The requested profile must be one of the values defined in and must be compatible with the requested audio MIME type. When using the , if the encoder does not support the requested profile, then it will be ignored to avoid any encoder configuration failures.

Parameters
profile: Int

The profile.

Returns
AudioEncoderSettings.Builder!

This builder.