<!--
{
  "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/MTAudioProcessingTapCreate(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Media Toolbox"
    ],
    "preciseIdentifier" : "c:@F@MTAudioProcessingTapCreate"
  },
  "title" : "MTAudioProcessingTapCreate(_:_:_:_:)"
}
-->

# MTAudioProcessingTapCreate(_:_:_:_:)

Creates a new audio processing tap.

```
func MTAudioProcessingTapCreate(_ allocator: CFAllocator?, _ callbacks: UnsafePointer<MTAudioProcessingTapCallbacks>, _ flags: MTAudioProcessingTapCreationFlags, _ tapOut: UnsafeMutablePointer<MTAudioProcessingTap?>) -> OSStatus
```

## Parameters

`allocator`

The allocator to use to allocate memory for the new tap. Pass `NULL` or `kCFAllocatorDefault` to use the current default allocator.

`callbacks`

An callbacks struct. [`MTAudioProcessingTap`](/documentation/MediaToolbox/MTAudioProcessingTap) makes a copy of this struct.

`flags`

Flags that are used to control aspects of the processing tap. Valid flags are:

- [`kMTAudioProcessingTapCreationFlag_PreEffects`](/documentation/MediaToolbox/kMTAudioProcessingTapCreationFlag_PreEffects): processing is done before any further effects are applied by the audio queue to the audio.
- [`kMTAudioProcessingTapCreationFlag_PostEffects`](/documentation/MediaToolbox/kMTAudioProcessingTapCreationFlag_PostEffects): processing is done after all processing is done, including that of other taps.

`tapOut`

The processing tap object.

## Return Value

An `OSStatus` result code.

## Overview

The processing tap will then be used to process decoded data. The processing is performed on audio either before or after any effects or other processing (varispeed, etc) is applied by the audio queue.

## Topics

### Flags

[`MTAudioProcessingTapCreationFlags`](/documentation/MediaToolbox/MTAudioProcessingTapCreationFlags)

Flags to use when creating audio processing taps.

### Callbacks

[`MTAudioProcessingTapCallbacks`](/documentation/MediaToolbox/MTAudioProcessingTapCallbacks)

A structure that defines life cycle callbacks for an audio processing tap object.



---

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)