Skip to content

[CoreMidi] Implement some of the missing CoreMIDI APIs. #22459

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/preview-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,19 @@ The
[AppStore.RequestReview](https://developer.apple.com/documentation/storekit/appstore/3954432-requestreview/)
method is Swift API we've bound manually, and as such it's marked as experimental until .NET 10.

[1]: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute?view=net-8.0

## Rgen (APL0003)

Rgen is the new Roslyn codegenerator based binding tool. The tool is underdevelopment and its API is open to change until
a stable release is announced.

The diagnostic id for Rgen is APL0003.

## CoreMidi.MidiDriver (APL0004)

The [MIDIDevice](https://developer.apple.com/documentation/coremidi/midi-drivers) API is untested, and as such it's marked experimental until .NET 11.

The diagnostic id for MidiDevice is APL0004.



[1]: https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.codeanalysis.experimentalattribute?view=net-8.0
23 changes: 23 additions & 0 deletions src/CoreFoundation/CFUuidBytes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
namespace CoreFoundation {
// This struct is only used for P/Invokes.
struct CFUuidBytes {
#pragma warning disable CS0649 // Field '...' is never assigned to, and will always have its default value 0
public byte Byte0;
public byte Byte1;
public byte Byte2;
public byte Byte3;
public byte Byte4;
public byte Byte5;
public byte Byte6;
public byte Byte7;
public byte Byte8;
public byte Byte9;
public byte Byte10;
public byte Byte11;
public byte Byte12;
public byte Byte13;
public byte Byte14;
public byte Byte15;
#pragma warning restore CS0649
}
}
4 changes: 1 addition & 3 deletions src/CoreMidi/MidiBluetoothDriver.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if !TVOS
//

// MidiBluetoothDriver.cs
//
// Authors: TJ Lambert (TJ.Lambert@microsoft.com)
Expand Down Expand Up @@ -38,4 +37,3 @@ public static int Disconnect (NSString uuid)
}
}
}
#endif
Loading
Loading