---
title: AudioBuffer
framework: coreaudiotypes
role: symbol
role_heading: Structure
path: coreaudiotypes/audiobuffer
---

# AudioBuffer

A structure that holds a buffer of audio data.

## Declaration

```swift
struct AudioBuffer
```

## Overview

Overview An audio buffer holds a single buffer of audio data in its mData field. The buffer can represent two types of audio: A single, monophonic, noninterleaved channel of audio Interleaved audio with the number of channels set by the mNumberChannels field note: The mDataByteSize and mNumberChannels parameters needs to match the memory layout of mData, so update the size and number of channels when you update the data field.

## Topics

### Creating a Buffer

- [init()](coreaudiotypes/audiobuffer/init().md)
- [init(mNumberChannels:mDataByteSize:mData:)](coreaudiotypes/audiobuffer/init(mnumberchannels:mdatabytesize:mdata:).md)

### Accessing the Audio

- [mNumberChannels](coreaudiotypes/audiobuffer/mnumberchannels.md)
- [mDataByteSize](coreaudiotypes/audiobuffer/mdatabytesize.md)
- [mData](coreaudiotypes/audiobuffer/mdata.md)

### Initializers

- [init(_:numberOfChannels:)](coreaudiotypes/audiobuffer/init(_:numberofchannels:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)

## See Also

### Buffers

- [AudioBufferList](coreaudiotypes/audiobufferlist.md)
