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

# MusicEventIteratorHasPreviousEvent(_:_:)

Indicates whether or not a music track contains an event before the music event iterator’s current position.

```
func MusicEventIteratorHasPreviousEvent(_ inIterator: MusicEventIterator, _ outHasPrevEvent: UnsafeMutablePointer<DarwinBoolean>) -> OSStatus
```

## Parameters

`inIterator`

The music event iterator whose state you want to know about.

`outHasPrevEvent`

On output, `true` (nonzero) if there is an event closer to the start of the music track than the music event iterator’s current position; `false` (zero) otherwise.

## Return Value

A result code.

## Discussion

---

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)