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

# MusicEventIteratorSetEventInfo(_:_:_:)

Sets information for the event at a music event iterator’s current position.

```
func MusicEventIteratorSetEventInfo(_ inIterator: MusicEventIterator, _ inEventType: MusicEventType, _ inEventData: UnsafeRawPointer) -> OSStatus
```

## Parameters

`inIterator`

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

`inEventType`

The type of music event that you are specifying. For possible event types, see [`MusicEventType`](/documentation/AudioToolbox/MusicEventType).

`inEventData`

The event data that you are specifying. The size and type of the data must be appropriate for the music event type you specify in the `inEventType` parameter.

## Return Value

A result code.

## Discussion

Use this function to set the music event type and event data for the event that a music event iterator is positioned at. This function doesn’t allow you to change an event’s timestamp; to do that, call the [`MusicEventIteratorSetEventTime(_:_:)`](/documentation/AudioToolbox/MusicEventIteratorSetEventTime(_:_:)) function.

---

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)