StudioSoundOptions.Builder

public final class StudioSoundOptions.Builder


Builder for constructing StudioSoundOptions instances.

Summary

Public constructors

Builder(AudioFormat audioFormat)

Constructs a new Builder with the specified audio format.

Public methods

StudioSoundOptions

Builds and returns a new StudioSoundOptions instance.

Public constructors

Builder

public Builder(AudioFormat audioFormat)

Constructs a new Builder with the specified audio format.

Parameters
AudioFormat audioFormat

the desired AudioFormat for the session; must have a sample rate between 8,000 and 48,000 Hz, a channel count of 1 or 2, and ENCODING_PCM_FLOAT encoding

Throws
java.lang.NullPointerException

if audioFormat is null.

java.lang.IllegalArgumentException

if sample rate is outside [8000, 48000] Hz, channel count is not 1 or 2, or encoding is not ENCODING_PCM_FLOAT.

Public methods

build

public StudioSoundOptions build()

Builds and returns a new StudioSoundOptions instance.

Returns
StudioSoundOptions

a new StudioSoundOptions instance