# AudioProcessor.AudioFormat

Artifact: [androidx.media3:media3-common](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/common/audio/AudioProcessor.java+class:androidx.media3.common.audio.AudioProcessor.AudioFormat)

*** ** * ** ***


```
class AudioProcessor.AudioFormat
```

<br />

*** ** * ** ***

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

## Summary

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#NOT_SET()` An `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat` instance to represent an unset `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat`. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#AudioFormat(androidx.media3.common.Format)(format: https://developer.android.com/reference/kotlin/androidx/media3/common/Format!)` Creates an instance using the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#sampleRate()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#channelCount()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#pcmEncoding()`. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#AudioFormat(int,int,int)(sampleRate: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, channelCount: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, @https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding encoding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#equals(java.lang.Object)(o: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#bytesPerFrame()` The number of bytes used to represent one audio frame. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#channelCount()` The number of interleaved channels. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `@https://developer.android.com/reference/kotlin/androidx/media3/common/C.PcmEncoding https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#encoding()` The type of linear PCM encoding. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat#sampleRate()` The sample rate in Hertz. |

## Constants

### NOT_SET

```
const val NOT_SET: AudioProcessor.AudioFormat!
```

An `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat` instance to represent an unset `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor.AudioFormat`. This should not be returned by `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor#configure(androidx.media3.common.audio.AudioProcessor.AudioFormat)` if the processor `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor#isActive()`.

Typically used to represent an inactive `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor``https://developer.android.com/reference/kotlin/androidx/media3/common/audio/AudioProcessor#configure(androidx.media3.common.audio.AudioProcessor.AudioFormat)`.

## Public constructors

### AudioFormat

```
AudioFormat(format: Format!)
```

Creates an instance using the `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#sampleRate()`, `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#channelCount()` and `https://developer.android.com/reference/kotlin/androidx/media3/common/Format#pcmEncoding()`.

### AudioFormat

```
AudioFormat(sampleRate: Int, channelCount: Int, @C.PcmEncoding encoding: Int)
```

## Public functions

### equals

```
fun equals(o: Any?): Boolean
```

### hashCode

```
fun hashCode(): Int
```

### toString

```
fun toString(): String!
```

## Public properties

### bytesPerFrame

```
val bytesPerFrame: Int
```

The number of bytes used to represent one audio frame.

### channelCount

```
val channelCount: Int
```

The number of interleaved channels.

### encoding

```
@C.PcmEncoding
val encoding: Int
```

The type of linear PCM encoding.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### sampleRate

```
val sampleRate: Int
```

The sample rate in Hertz.