---
title: "read(into:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiofile/read(into:)"
---

# read(into:)

Reads an entire audio buffer.

## Declaration

```swift
func read(into buffer: AVAudioPCMBuffer) throws
```

## Parameters

- `buffer`: The buffer from which to read the file. Its format must match the file’s processing format.

## Discussion

Discussion When reading sequentially from the framePosition property, the method attempts to fill the buffer to its capacity. On return, the buffer’s length property indicates the number of sample frames it successfully reads.

## See Also

### Related Documentation

- [framePosition](avfaudio/avaudiofile/frameposition.md)
- [length](avfaudio/avaudiofile/length.md)

### Reading and Writing the Audio Buffer

- [read(into:frameCount:)](avfaudio/avaudiofile/read(into:framecount:).md)
- [read(frameCount:)](avfaudio/avaudiofile/read(framecount:).md)
- [close()](avfaudio/avaudiofile/close().md)
