<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAudioTypes",
  "identifier" : "/documentation/CoreAudioTypes/AudioStreamBasicDescription",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Audio Types"
    ],
    "preciseIdentifier" : "c:@S@AudioStreamBasicDescription"
  },
  "title" : "AudioStreamBasicDescription"
}
-->

# AudioStreamBasicDescription

A format specification for an audio stream.

```
struct AudioStreamBasicDescription
```

## Overview

You can configure an audio stream basic description (ASBD) to specify a linear PCM format or a constant bit rate (CBR) format that has channels of equal size. For variable bit rate (VBR) audio, and for CBR audio where the channels have unequal sizes, also use an [`AudioStreamPacketDescription`](/documentation/CoreAudioTypes/AudioStreamPacketDescription) structure to additionally describe each packet.

A field value of `0` indicates that the value is either unknown or not applicable to the format.

Always initialize the fields of a new audio stream basic description structure to `0`, as the example below shows:

```objc
AudioStreamBasicDescription myAudioDataFormat = {0};
```

To determine the duration that one packet represents, use the [`mSampleRate`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mSampleRate) field with the [`mFramesPerPacket`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mFramesPerPacket) field, as follows:

```objc
duration = (1 / mSampleRate) * mFramesPerPacket
```

In Core Audio, the following definitions apply:

- An *audio stream* is a continuous series of data that represents a sound, such as a song.
- A *channel* is a discrete track of monophonic audio. A monophonic stream has one channel; a stereo stream has two channels.
- A *sample* is single numerical value for a single audio channel in an audio stream.
- A *frame* is a collection of time-coincident samples. For instance, a linear PCM stereo sound file has two samples per frame, one for the left channel and one for the right channel.
- A *packet* is a collection of one or more contiguous frames. A packet defines the smallest meaningful set of frames for a given audio data format, and is the smallest data unit for which time can be measured. In linear PCM audio, a packet holds a single frame. In compressed formats, it typically holds more frames. In some formats, the number of frames per packet varies.
- The *sample rate* for a stream is the number of frames per second of uncompressed audio, or, for compressed formats, the equivalent in decompressed audio.

## Topics

### Inspecting a description

[`mFormatID`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mFormatID)

An identifier specifying the general audio data format in the stream.

[`mFormatFlags`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mFormatFlags)

Format-specific flags to specify details of the format.

[`mSampleRate`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mSampleRate)

The number of frames per second of the data in the stream, when playing the stream at normal speed.

[`mBitsPerChannel`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mBitsPerChannel)

The number of bits for one audio sample.

[`mBytesPerFrame`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mBytesPerFrame)

The number of bytes from the start of one frame to the start of the next frame in an audio buffer.

[`mChannelsPerFrame`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mChannelsPerFrame)

The number of channels in each frame of audio data.

[`mBytesPerPacket`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mBytesPerPacket)

The number of bytes in a packet of audio data.

[`mFramesPerPacket`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mFramesPerPacket)

The number of frames in a packet of audio data.

[`mReserved`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/mReserved)

The amount to pad the structure to force an even 8-byte alignment.

### Initializers

[`init()`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/init())

Creates an empty description.

[`init(mSampleRate:mFormatID:mFormatFlags:mBytesPerPacket:mFramesPerPacket:mBytesPerFrame:mChannelsPerFrame:mBitsPerChannel:mReserved:)`](/documentation/CoreAudioTypes/AudioStreamBasicDescription/init(mSampleRate:mFormatID:mFormatFlags:mBytesPerPacket:mFramesPerPacket:mBytesPerFrame:mChannelsPerFrame:mBitsPerChannel:mReserved:))

Creates a description with the specified values.



---

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)