public abstract class

AudioSpec.Builder

extends java.lang.Object

 java.lang.Object

↳androidx.camera.video.AudioSpec.Builder

Overview

The builder of the AudioSpec.

Summary

Methods
public abstract AudioSpecbuild()

Builds the AudioSpec instance.

public abstract AudioSpec.BuildersetBitrate(<any> bitrate)

Sets the desired range of bitrates to be used by the encoder.

public abstract AudioSpec.BuildersetChannelCount(int channelCount)

Sets the desired number of audio channels.

public abstract AudioSpec.BuildersetSampleRate(<any> sampleRate)

Sets the desired range of sample rates to be used by the encoder.

public abstract AudioSpec.BuildersetSource(int source)

Sets the audio source.

public abstract AudioSpec.BuildersetSourceFormat(int audioFormat)

Sets the audio source format.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods

public abstract AudioSpec.Builder setBitrate(<any> bitrate)

Sets the desired range of bitrates to be used by the encoder.

If not set, defaults to AudioSpec.BITRATE_RANGE_AUTO.

public abstract AudioSpec.Builder setSourceFormat(int audioFormat)

Sets the audio source format.

Available values for source format are AudioSpec.SOURCE_FORMAT_AUTO and AudioSpec.SOURCE_FORMAT_PCM_16BIT.

If not set, defaults to AudioSpec.SOURCE_FORMAT_AUTO.

public abstract AudioSpec.Builder setSource(int source)

Sets the audio source.

Available values for source are AudioSpec.SOURCE_AUTO and AudioSpec.SOURCE_CAMCORDER.

If not set, defaults to AudioSpec.SOURCE_AUTO.

public abstract AudioSpec.Builder setSampleRate(<any> sampleRate)

Sets the desired range of sample rates to be used by the encoder.

If not set, defaults to AudioSpec.SAMPLE_RATE_RANGE_AUTO.

public abstract AudioSpec.Builder setChannelCount(int channelCount)

Sets the desired number of audio channels.

If not set, defaults to AudioSpec.CHANNEL_COUNT_AUTO. Other common channel counts include AudioSpec.CHANNEL_COUNT_MONO or AudioSpec.CHANNEL_COUNT_STEREO.

Setting to AudioSpec.CHANNEL_COUNT_NONE is equivalent to requesting that no audio should be present.

public abstract AudioSpec build()

Builds the AudioSpec instance.