<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/CMReadySampleBuffer/init(compressedAudioDataBuffer:formatDescription:presentationTimeStamp:packetDescriptions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Core Media",
      "CoreMedia"
    ],
    "preciseIdentifier" : "s:9CoreMedia19CMReadySampleBufferVA2A019CMReadOnlyDataBlockE0VRszrlE015compressedAudiohE017formatDescription21presentationTimeStamp18packetDescriptionsACyAEGAE_So08CMFormatM3RefaSo6CMTimeaSaySo0k12StreamPacketM0VGtcfc"
  },
  "title" : "init(compressedAudioDataBuffer:formatDescription:presentationTimeStamp:packetDescriptions:)"
}
-->

# init(compressedAudioDataBuffer:formatDescription:presentationTimeStamp:packetDescriptions:)

Creates a sample buffer carrying compressed audio media data.

```
init(compressedAudioDataBuffer content: Content, formatDescription: CMAudioFormatDescription, presentationTimeStamp: CMTime, packetDescriptions: [AudioStreamPacketDescription])
```

## Parameters

`formatDescription`

Format description of the content. The format must have audio media type.

`presentationTimeStamp`

The time at which the first sample will be presented. Must be valid numeric time.

`packetDescriptions`

Array of packet descriptions one for each sample.

## Discussion

Use this init when the audio format where the packet size isn’t constant, such as variable bit rate or when the
channels have unequal sizes. The `packetDescriptions` are used along with `presentationTimeStamp` to calculate the
sample count, sample sizes & sample timings.

---

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)