AudioProcessor.AudioFormat


public final class AudioProcessor.AudioFormat


PCM audio format that may be handled by an audio processor.

Summary

Constants

static final AudioProcessor.AudioFormat

An AudioFormat instance to represent an unset AudioFormat.

Public fields

final int

The number of bytes used to represent one audio frame.

final int

The number of interleaved channels.

final int

The type of linear PCM encoding.

final int

The sample rate in Hertz.

Public constructors

Creates an instance using the sampleRate, channelCount and pcmEncoding.

AudioFormat(int sampleRate, int channelCount, @C.PcmEncoding int encoding)

Public methods

boolean
int
String

Constants

NOT_SET

public static final AudioProcessor.AudioFormat NOT_SET

An AudioFormat instance to represent an unset AudioFormat. This should not be returned by configure if the processor isActive.

Typically used to represent an inactive AudioProcessor output format.

Public fields

bytesPerFrame

public final int bytesPerFrame

The number of bytes used to represent one audio frame.

channelCount

public final int channelCount

The number of interleaved channels.

encoding

@C.PcmEncoding
public final int encoding

The type of linear PCM encoding.

sampleRate

public final int sampleRate

The sample rate in Hertz.

Public constructors

AudioFormat

public AudioFormat(Format format)

Creates an instance using the sampleRate, channelCount and pcmEncoding.

AudioFormat

public AudioFormat(int sampleRate, int channelCount, @C.PcmEncoding int encoding)

Public methods

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()

toString

public String toString()