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

# HostCallback_GetBeatAndTempo

When called by the system, provides beat and tempo information to an audio unit from a host application.

```
typealias HostCallback_GetBeatAndTempo = (UnsafeMutableRawPointer?, UnsafeMutablePointer<Float64>?, UnsafeMutablePointer<Float64>?) -> OSStatus
```

## Parameters

`inHostUserData`

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

`outCurrentBeat`

On output, the current beat of the music that is playing.

`outCurrentTempo`

On output, the current tempo of the music that is playing.

## Discussion

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

---

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)