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

# MTAudioProcessingTapGetSourceAudio(_:_:_:_:_:_:)

Retrieves source audio for an audio processing tap.

```
func MTAudioProcessingTapGetSourceAudio(_ tap: MTAudioProcessingTap, _ numberFrames: CMItemCount, _ bufferListInOut: UnsafeMutablePointer<AudioBufferList>, _ flagsOut: UnsafeMutablePointer<MTAudioProcessingTapFlags>?, _ timeRangeOut: UnsafeMutablePointer<CMTimeRange>?, _ numberFramesOut: UnsafeMutablePointer<CMItemCount>?) -> OSStatus
```

## Parameters

`tap`

The processing tap.

`numberFrames`

The number of frames the processing tap requires for its processing.

`bufferListInOut`

The audio buffer list which will contain the source data.
On input, all fields except for the buffer pointers must be filled in.
If the buffer pointers are NULL (recommended), non-NULL pointers will be
returned and system owns the source buffers; these buffers are only applicable
for the duration of the processing tap callback.
If the buffer pointers are non-NULL, then they must be big enough to hold
numberFrames, and the source data will be copied into these buffers.

`flagsOut`

Flags to describe state about the input requested, e.g., discontinuity/complete. Can be NULL.

`timeRangeOut`

The asset time range corresponding to the provided source audio frames. Can be NULL.

`numberFramesOut`

The number of source frames that have been provided. Can be NULL. This can be less than the number of requested frames specified in numberFrames.

## Return Value

An `OSStatus` result code.

## Overview

This function may only be called from the processing tap’s callback.

---

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)