---
title: "write(from:)"
framework: avfaudio
role: symbol
role_heading: Instance Method
path: "avfaudio/avaudiofile/write(from:)-6qgec"
---

# write(from:)

## Declaration

```swift
func write(from buffer: AVAudioPCMBuffer) throws
```

## Parameters

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

## Discussion

Discussion Write a buffer. Writes sequentially. The buffer’s frameLength signifies how much of the buffer is to be written.
