---
title: "MusicEventIteratorDeleteEvent(_:)"
framework: audiotoolbox
role: symbol
role_heading: Function
path: "audiotoolbox/musiceventiteratordeleteevent(_:)"
---

# MusicEventIteratorDeleteEvent(_:)

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

## Declaration

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

## Parameters

- `inIterator`: The music event iterator whose current event you want to delete.

## Return Value

Return Value A result code.

## Discussion

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.

## See Also

### Iterating Over Music Events

- [NewMusicEventIterator(_:_:)](audiotoolbox/newmusiceventiterator(_:_:).md)
- [DisposeMusicEventIterator(_:)](audiotoolbox/disposemusiceventiterator(_:).md)
- [MusicEventIteratorNextEvent(_:)](audiotoolbox/musiceventiteratornextevent(_:).md)
- [MusicEventIteratorSeek(_:_:)](audiotoolbox/musiceventiteratorseek(_:_:).md)
- [MusicEventIteratorGetEventInfo(_:_:_:_:_:)](audiotoolbox/musiceventiteratorgeteventinfo(_:_:_:_:_:).md)
- [MusicEventIteratorHasCurrentEvent(_:_:)](audiotoolbox/musiceventiteratorhascurrentevent(_:_:).md)
- [MusicEventIteratorHasNextEvent(_:_:)](audiotoolbox/musiceventiteratorhasnextevent(_:_:).md)
- [MusicEventIteratorHasPreviousEvent(_:_:)](audiotoolbox/musiceventiteratorhaspreviousevent(_:_:).md)
- [MusicEventIteratorPreviousEvent(_:)](audiotoolbox/musiceventiteratorpreviousevent(_:).md)
- [MusicEventIteratorSetEventInfo(_:_:_:)](audiotoolbox/musiceventiteratorseteventinfo(_:_:_:).md)
- [MusicEventIteratorSetEventTime(_:_:)](audiotoolbox/musiceventiteratorseteventtime(_:_:).md)
- [MusicEventIterator](audiotoolbox/musiceventiterator.md)
- [MusicEventType](audiotoolbox/musiceventtype.md)
- [ExtendedNoteOnEvent](audiotoolbox/extendednoteonevent.md)
- [ExtendedTempoEvent](audiotoolbox/extendedtempoevent.md)
