---
title: AUInputSamplesInOutputCallback
framework: audiotoolbox
role: symbol
role_heading: Type Alias
path: audiotoolbox/auinputsamplesinoutputcallback
---

# AUInputSamplesInOutputCallback

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

## Declaration

```swift
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

Return Value A result code.

## Discussion

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.

## See Also

### Getting Information from the Host

- [HostCallback_GetBeatAndTempo](audiotoolbox/hostcallback_getbeatandtempo.md)
- [HostCallback_GetMusicalTimeLocation](audiotoolbox/hostcallback_getmusicaltimelocation.md)
- [HostCallback_GetTransportState](audiotoolbox/hostcallback_gettransportstate.md)
- [HostCallback_GetTransportState2](audiotoolbox/hostcallback_gettransportstate2.md)
- [AUMIDIOutputCallback](audiotoolbox/aumidioutputcallback.md)
