Documentation Archive Developer
Search

CoreMIDI Changes for Objective-C

CoreMIDI

MIDIServices.h

Removed #def MIDIPacketNext
Declaration
From
OSStatus MIDIClientCreate (
    CFStringRef name,
    MIDINotifyProc notifyProc,
    void *notifyRefCon,
    MIDIClientRef *outClient
);
To
OSStatus MIDIClientCreate (
    CFStringRef _Nonnull name,
    MIDINotifyProc _Nullable notifyProc,
    void * _Nullable notifyRefCon,
    MIDIClientRef * _Nonnull outClient
);

Declaration
From
OSStatus MIDIDestinationCreate (
    MIDIClientRef client,
    CFStringRef name,
    MIDIReadProc readProc,
    void *refCon,
    MIDIEndpointRef *outDest
);
To
OSStatus MIDIDestinationCreate (
    MIDIClientRef client,
    CFStringRef _Nonnull name,
    MIDIReadProc _Nonnull readProc,
    void * _Nullable refCon,
    MIDIEndpointRef * _Nonnull outDest
);

Declaration
From
OSStatus MIDIEndpointGetEntity (
    MIDIEndpointRef inEndpoint,
    MIDIEntityRef *outEntity
);
To
OSStatus MIDIEndpointGetEntity (
    MIDIEndpointRef inEndpoint,
    MIDIEntityRef * _Nullable outEntity
);

Declaration
From
OSStatus MIDIEntityGetDevice (
    MIDIEntityRef inEntity,
    MIDIDeviceRef *outDevice
);
To
OSStatus MIDIEntityGetDevice (
    MIDIEntityRef inEntity,
    MIDIDeviceRef * _Nullable outDevice
);

Declaration
From
OSStatus MIDIInputPortCreate (
    MIDIClientRef client,
    CFStringRef portName,
    MIDIReadProc readProc,
    void *refCon,
    MIDIPortRef *outPort
);
To
OSStatus MIDIInputPortCreate (
    MIDIClientRef client,
    CFStringRef _Nonnull portName,
    MIDIReadProc _Nonnull readProc,
    void * _Nullable refCon,
    MIDIPortRef * _Nonnull outPort
);

Declaration
From
OSStatus MIDIObjectFindByUniqueID (
    MIDIUniqueID inUniqueID,
    MIDIObjectRef *outObject,
    MIDIObjectType *outObjectType
);
To
OSStatus MIDIObjectFindByUniqueID (
    MIDIUniqueID inUniqueID,
    MIDIObjectRef * _Nonnull outObject,
    MIDIObjectType * _Nonnull outObjectType
);

Declaration
From
OSStatus MIDIObjectGetDataProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    CFDataRef *outData
);
To
OSStatus MIDIObjectGetDataProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    CFDataRef  _Nullable * _Nonnull outData
);

Declaration
From
OSStatus MIDIObjectGetDictionaryProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    CFDictionaryRef *outDict
);
To
OSStatus MIDIObjectGetDictionaryProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    CFDictionaryRef  _Nullable * _Nonnull outDict
);

Declaration
From
OSStatus MIDIObjectGetIntegerProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    SInt32 *outValue
);
To
OSStatus MIDIObjectGetIntegerProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    SInt32 * _Nonnull outValue
);

Declaration
From
OSStatus MIDIObjectGetProperties (
    MIDIObjectRef obj,
    CFPropertyListRef *outProperties,
    Boolean deep
);
To
OSStatus MIDIObjectGetProperties (
    MIDIObjectRef obj,
    CFPropertyListRef  _Nullable * _Nonnull outProperties,
    Boolean deep
);

Declaration
From
OSStatus MIDIObjectGetStringProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    CFStringRef *str
);
To
OSStatus MIDIObjectGetStringProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    CFStringRef  _Nullable * _Nonnull str
);

Declaration
From
OSStatus MIDIObjectRemoveProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID
);
To
OSStatus MIDIObjectRemoveProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID
);

Declaration
From
OSStatus MIDIObjectSetDataProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    CFDataRef data
);
To
OSStatus MIDIObjectSetDataProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    CFDataRef _Nonnull data
);

Declaration
From
OSStatus MIDIObjectSetDictionaryProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    CFDictionaryRef data
);
To
OSStatus MIDIObjectSetDictionaryProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    CFDictionaryRef _Nonnull dict
);

Declaration
From
OSStatus MIDIObjectSetIntegerProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    SInt32 value
);
To
OSStatus MIDIObjectSetIntegerProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    SInt32 value
);

Declaration
From
OSStatus MIDIObjectSetStringProperty (
    MIDIObjectRef obj,
    CFStringRef propertyID,
    CFStringRef str
);
To
OSStatus MIDIObjectSetStringProperty (
    MIDIObjectRef obj,
    CFStringRef _Nonnull propertyID,
    CFStringRef _Nonnull str
);

Declaration
From
OSStatus MIDIOutputPortCreate (
    MIDIClientRef client,
    CFStringRef portName,
    MIDIPortRef *outPort
);
To
OSStatus MIDIOutputPortCreate (
    MIDIClientRef client,
    CFStringRef _Nonnull portName,
    MIDIPortRef * _Nonnull outPort
);

Declaration
From
MIDIPacket * MIDIPacketListAdd (
    MIDIPacketList *pktlist,
    ByteCount listSize,
    MIDIPacket *curPacket,
    MIDITimeStamp time,
    ByteCount nData,
    const Byte *data
);
To
MIDIPacket * _Nonnull MIDIPacketListAdd (
    MIDIPacketList * _Nonnull pktlist,
    ByteCount listSize,
    MIDIPacket * _Nonnull curPacket,
    MIDITimeStamp time,
    ByteCount nData,
    const Byte * _Nonnull data
);

Declaration
From
MIDIPacket * MIDIPacketListInit (
    MIDIPacketList *pktlist
);
To
MIDIPacket * _Nonnull MIDIPacketListInit (
    MIDIPacketList * _Nonnull pktlist
);

Declaration
From
OSStatus MIDIPortConnectSource (
    MIDIPortRef port,
    MIDIEndpointRef source,
    void *connRefCon
);
To
OSStatus MIDIPortConnectSource (
    MIDIPortRef port,
    MIDIEndpointRef source,
    void * _Nullable connRefCon
);

Declaration
From
OSStatus MIDIReceived (
    MIDIEndpointRef src,
    const MIDIPacketList *pktlist
);
To
OSStatus MIDIReceived (
    MIDIEndpointRef src,
    const MIDIPacketList * _Nonnull pktlist
);

Modified MIDISend()
Declaration
From
OSStatus MIDISend (
    MIDIPortRef port,
    MIDIEndpointRef dest,
    const MIDIPacketList *pktlist
);
To
OSStatus MIDISend (
    MIDIPortRef port,
    MIDIEndpointRef dest,
    const MIDIPacketList * _Nonnull pktlist
);

Declaration
From
OSStatus MIDISendSysex (
    MIDISysexSendRequest *request
);
To
OSStatus MIDISendSysex (
    MIDISysexSendRequest * _Nonnull request
);

Declaration
From
OSStatus MIDISourceCreate (
    MIDIClientRef client,
    CFStringRef name,
    MIDIEndpointRef *outSrc
);
To
OSStatus MIDISourceCreate (
    MIDIClientRef client,
    CFStringRef _Nonnull name,
    MIDIEndpointRef * _Nonnull outSrc
);

MIDISetup.h

Declaration
From
OSStatus MIDIDeviceAddEntity (
    MIDIDeviceRef device,
    CFStringRef name,
    Boolean embedded,
    ItemCount numSourceEndpoints,
    ItemCount numDestinationEndpoints,
    MIDIEntityRef *newEntity
);
To
OSStatus MIDIDeviceAddEntity (
    MIDIDeviceRef device,
    CFStringRef _Nonnull name,
    Boolean embedded,
    ItemCount numSourceEndpoints,
    ItemCount numDestinationEndpoints,
    MIDIEntityRef * _Nonnull newEntity
);

Declaration
From
OSStatus MIDIExternalDeviceCreate (
    CFStringRef name,
    CFStringRef manufacturer,
    CFStringRef model,
    MIDIDeviceRef *outDevice
);
To
OSStatus MIDIExternalDeviceCreate (
    CFStringRef _Nonnull name,
    CFStringRef _Nonnull manufacturer,
    CFStringRef _Nonnull model,
    MIDIDeviceRef * _Nonnull outDevice
);

Declaration
From
OSStatus MIDIGetSerialPortDrivers (
    CFArrayRef *outDriverNames
);
To
OSStatus MIDIGetSerialPortDrivers (
    CFArrayRef  _Nullable * _Nonnull outDriverNames
);

Declaration
From
OSStatus MIDIGetSerialPortOwner (
    CFStringRef portName,
    CFStringRef *outDriverName
);
To
OSStatus MIDIGetSerialPortOwner (
    CFStringRef _Nonnull portName,
    CFStringRef  _Nullable * _Nonnull outDriverName
);

Declaration
From
OSStatus MIDISetSerialPortOwner (
    CFStringRef portName,
    CFStringRef driverName
);
To
OSStatus MIDISetSerialPortOwner (
    CFStringRef _Nonnull portName,
    CFStringRef _Nonnull driverName
);

Declaration
From
OSStatus MIDISetupCreate (
    MIDISetupRef *outSetup
);
To
OSStatus MIDISetupCreate (
    MIDISetupRef * _Nonnull outSetup
);

Declaration
From
OSStatus MIDISetupFromData (
    CFDataRef data,
    MIDISetupRef *outSetup
);
To
OSStatus MIDISetupFromData (
    CFDataRef _Nonnull data,
    MIDISetupRef * _Nonnull outSetup
);

Declaration
From
OSStatus MIDISetupGetCurrent (
    MIDISetupRef *outSetup
);
To
OSStatus MIDISetupGetCurrent (
    MIDISetupRef * _Nonnull outSetup
);

Declaration
From
OSStatus MIDISetupToData (
    MIDISetupRef setup,
    CFDataRef *outData
);
To
OSStatus MIDISetupToData (
    MIDISetupRef setup,
    CFDataRef  _Nullable * _Nonnull outData
);

MIDIThruConnection.h

Declaration
From
OSStatus MIDIThruConnectionCreate (
    CFStringRef inPersistentOwnerID,
    CFDataRef inConnectionParams,
    MIDIThruConnectionRef *outConnection
);
To
OSStatus MIDIThruConnectionCreate (
    CFStringRef _Nullable inPersistentOwnerID,
    CFDataRef _Nonnull inConnectionParams,
    MIDIThruConnectionRef * _Nonnull outConnection
);

Declaration
From
OSStatus MIDIThruConnectionFind (
    CFStringRef inPersistentOwnerID,
    CFDataRef *outConnectionList
);
To
OSStatus MIDIThruConnectionFind (
    CFStringRef _Nonnull inPersistentOwnerID,
    CFDataRef  _Nonnull * _Nonnull outConnectionList
);

Declaration
From
OSStatus MIDIThruConnectionGetParams (
    MIDIThruConnectionRef connection,
    CFDataRef *outConnectionParams
);
To
OSStatus MIDIThruConnectionGetParams (
    MIDIThruConnectionRef connection,
    CFDataRef  _Nonnull * _Nonnull outConnectionParams
);

Declaration
From
void MIDIThruConnectionParamsInitialize (
    MIDIThruConnectionParams *inConnectionParams
);
To
void MIDIThruConnectionParamsInitialize (
    MIDIThruConnectionParams * _Nonnull inConnectionParams
);

Declaration
From
OSStatus MIDIThruConnectionSetParams (
    MIDIThruConnectionRef connection,
    CFDataRef inConnectionParams
);
To
OSStatus MIDIThruConnectionSetParams (
    MIDIThruConnectionRef connection,
    CFDataRef _Nonnull inConnectionParams
);