---
title: "MIDIFlushOutput(_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/midiflushoutput(_:)"
---

# MIDIFlushOutput(_:)

Cancels all pending events that were previously scheduled to send.

## Declaration

```swift
func MIDIFlushOutput(_ dest: MIDIEndpointRef) -> OSStatus
```

## Parameters

- `dest`: The destination with pending events to cancel. If doc://com.apple.documentation/documentation/ObjectiveC/nil-227m0, the operation applies to all destinations.

## Return Value

Return Value An OSStatus result code.

## See Also

### I/O management

- [MIDISysexSendRequest](coremidi/midisysexsendrequest.md)
- [MIDISysexSendRequestUMP](coremidi/midisysexsendrequestump.md)
- [MIDIRestart()](coremidi/midirestart().md)
- [MIDIIOErrorNotification](coremidi/midiioerrornotification.md)
