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

# MusicEventIteratorDeleteEvent(_:)

Deletes the event at a music event iterator’s current position.

```
func MusicEventIteratorDeleteEvent(_ inIterator: MusicEventIterator) -> OSStatus
```

## Parameters

`inIterator`

The music event iterator whose current event you want to delete.

## Return Value

A result code.

## Discussion

After calling this function, the music event iterator points to the event that follows the deleted event—if there is such an event. If the event you deleted was the final event, the iterator is then positioned immediately beyond the final event of the music track.

---

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)