<!--
{
  "availability" : [
    "iOS: 2.1.0 -",
    "iPadOS: 2.1.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/ExtAudioFileWrite(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@F@ExtAudioFileWrite"
  },
  "title" : "ExtAudioFileWrite(_:_:_:)"
}
-->

# ExtAudioFileWrite(_:_:_:)

Performs a synchronous, sequential write operation on an audio file.

```
func ExtAudioFileWrite(_ inExtAudioFile: ExtAudioFileRef, _ inNumberFrames: UInt32, _ ioData: UnsafePointer<AudioBufferList>) -> OSStatus
```

## Parameters

`inExtAudioFile`

The extended audio file object that represents the file to write to.

`inNumberFrames`

The number of frames to write.

`ioData`

The buffer(s) from which audio data is written to the file.

## Return Value

A result code.

## Discussion

If the extended audio file object has an application data format, then the object’s converter converts the data in the `ioData` parameter to the file data format.

---

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)