<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFAudio",
  "identifier" : "/documentation/AVFAudio/AVAudioPCMBuffer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AVFAudio"
    ],
    "preciseIdentifier" : "c:objc(cs)AVAudioPCMBuffer"
  },
  "title" : "AVAudioPCMBuffer"
}
-->

# AVAudioPCMBuffer

An object that represents an audio buffer you use with PCM audio formats.

```
class AVAudioPCMBuffer
```

## Overview

The PCM buffer class provides methods that are useful for manipulating buffers of audio in PCM format.

## Topics

### Creating a PCM Audio Buffer

[`-  initWithPCMFormat:frameCapacity:`](/documentation/AVFAudio/AVAudioPCMBuffer/init(pcmFormat:frameCapacity:)-5jhd5)

Creates a PCM audio buffer instance for PCM audio data.

[`-  initWithPCMFormat:bufferListNoCopy:deallocator:`](/documentation/AVFAudio/AVAudioPCMBuffer/init(pcmFormat:bufferListNoCopy:deallocator:)-9iwe7)

Creates a PCM audio buffer instance without copying samples, for PCM audio data, with a specified buffer list and a deallocator closure.

### Getting and Setting the Frame Length

[`frameLength`](/documentation/AVFAudio/AVAudioPCMBuffer/frameLength)

The current number of valid sample frames in the buffer.

### Accessing PCM Buffer Data

[`channelData(_:)`](/documentation/AVFAudio/AVAudioPCMBuffer/channelData(_:))

Returns read-only access to a specific channel’s data.

[`mutableChannelData(_:)`](/documentation/AVFAudio/AVAudioPCMBuffer/mutableChannelData(_:))

Returns mutable access to a specific channel’s data.

[`withUnsafeAudioBufferList(_:)`](/documentation/AVFAudio/AVAudioPCMBuffer/withUnsafeAudioBufferList(_:))

Provides scoped read-only access to the audio buffer list.

[`floatChannelData`](/documentation/AVFAudio/AVAudioPCMBuffer/floatChannelData)

The buffer’s audio samples as floating point values.

[`frameCapacity`](/documentation/AVFAudio/AVAudioPCMBuffer/frameCapacity)

The buffer’s capacity, in audio sample frames.

[`int16ChannelData`](/documentation/AVFAudio/AVAudioPCMBuffer/int16ChannelData)

The buffer’s 16-bit integer audio samples.

[`int32ChannelData`](/documentation/AVFAudio/AVAudioPCMBuffer/int32ChannelData)

The buffer’s 32-bit integer audio samples.

[`stride`](/documentation/AVFAudio/AVAudioPCMBuffer/stride)

The buffer’s number of interleaved channels.

[`ChannelData`](/documentation/AVFAudio/AVAudioPCMBuffer/ChannelData)

Represents read-only channel data.

[`MutableChannelData`](/documentation/AVFAudio/AVAudioPCMBuffer/MutableChannelData)

Represents mutable channel data.

## Relationships

### Inherits From

[`AVAudioBuffer`](/documentation/AVFAudio/AVAudioBuffer)

### Conforms To

[`NSMutableCopying`](/documentation/Foundation/NSMutableCopying)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)