public final class

AudioProcessor.AudioFormat

extends java.lang.Object

 java.lang.Object

↳androidx.media3.common.audio.AudioProcessor.AudioFormat

Overview

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

Summary

Fields
public final intbytesPerFrame

The number of bytes used to represent one audio frame.

public final intchannelCount

The number of interleaved channels.

public final intencoding

The type of linear PCM encoding.

public static final AudioProcessor.AudioFormatNOT_SET

An AudioProcessor.AudioFormat instance to represent an unset AudioProcessor.AudioFormat.

public final intsampleRate

The sample rate in Hertz.

Constructors
publicAudioFormat(Format format)

Creates an instance using the Format.sampleRate, Format.channelCount and Format.pcmEncoding.

publicAudioFormat(int sampleRate, int channelCount, int encoding)

Methods
public booleanequals(java.lang.Object o)

public inthashCode()

public java.lang.StringtoString()

from java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, wait

Fields

public static final AudioProcessor.AudioFormat NOT_SET

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

Typically used to represent an inactive AudioProcessor output format.

public final int sampleRate

The sample rate in Hertz.

public final int channelCount

The number of interleaved channels.

public final int encoding

The type of linear PCM encoding.

public final int bytesPerFrame

The number of bytes used to represent one audio frame.

Constructors

public AudioFormat(Format format)

Creates an instance using the Format.sampleRate, Format.channelCount and Format.pcmEncoding.

public AudioFormat(int sampleRate, int channelCount, int encoding)

Methods

public java.lang.String toString()

public boolean equals(java.lang.Object o)

public int hashCode()