Skip to content
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

Constants in MIKMIDISystemExclusiveCommand don't work nicely in Swift. #238

Closed
armadsen opened this issue Feb 15, 2018 · 0 comments
Closed

Comments

@armadsen
Copy link
Member

armadsen commented Feb 15, 2018

The #defined constants in MIKMIDISystemExclusiveCommand are bridged into Swift as Int32s. However, the properties they're to be used for, manufacturerID and sysexChannel, are UInt32 and UInt8, respectively.

This means a simple assignment in Swift produces a compiler warning, and they have to be converted to the correct types before being used:

mmc.sysexChannel = UInt8(kMIKMIDISysexChannelDisregard)
mmc.manufacturerID = UInt32(kMIKMIDISysexRealtimeManufacturerID)

We should convert these to real constants instead of #defines so they have a non-implicit type.

@armadsen armadsen added this to the 1.7 milestone Feb 15, 2018
armadsen added a commit that referenced this issue Mar 17, 2018
armadsen added a commit that referenced this issue Nov 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant