<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioToolbox",
  "identifier" : "/documentation/AudioToolbox/AUInputSamplesInOutputCallback",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Audio Toolbox"
    ],
    "preciseIdentifier" : "c:@T@AUInputSamplesInOutputCallback"
  },
  "title" : "AUInputSamplesInOutputCallback"
}
-->

# AUInputSamplesInOutputCallback

Called by the system when an audio unit has provided a buffer of output samples.

```
typealias AUInputSamplesInOutputCallback = (UnsafeMutableRawPointer, UnsafePointer<AudioTimeStamp>, Float64, Float64) -> Void
```

## Parameters

`inRefCon`

Custom data that you provided when registering your callback with the audio unit.

`inOutputTimeStamp`

The time stamp that corresponds to the first sample of audio data produced in AudioUnitRender (its output data).

`inInputSample`

The sample number of the input that is represented in the first sample of that output time stamp.

`inNumberInputSamples`

The number of input samples that are represented in an output buffer.

## Return Value

A result code.

## Discussion

If you named your callback function `MyAUInputSamplesInOutputCallback`, you would declare it like this:

### Discussion

When your application uses a *varispeed* or pitch-shifting audio unit, it may not be clear which input samples are represented in a buffer of output samples. This callback function addresses this issue by providing the input sample number corresponding to the first sample in an output buffer.

---

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)