<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDIFlushOutput(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:@F@MIDIFlushOutput"
  },
  "title" : "MIDIFlushOutput(_:)"
}
-->

# MIDIFlushOutput(_:)

Cancels all pending events that were previously scheduled to send.

```
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

An `OSStatus` 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)