AudioEncoderSettings.Builder


public final class AudioEncoderSettings.Builder


Builds AudioEncoderSettings instances.

Summary

Public constructors

Creates a new instance.

Public constructors

Builder

public Builder()

Creates a new instance.

Public methods

build

public AudioEncoderSettings build()

Builds the instance.

setBitrate

@CanIgnoreReturnValue
public AudioEncoderSettings.Builder setBitrate(int bitrate)

Sets the bitrate.

The default value is NO_VALUE.

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

Parameters
int bitrate

The bitrate in bits per second.

Returns
AudioEncoderSettings.Builder

This builder.

setProfile

@CanIgnoreReturnValue
public AudioEncoderSettings.Builder setProfile(int profile)

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
int profile

The profile.

Returns
AudioEncoderSettings.Builder

This builder.