/packages/univint/src/MIDISetup.pas
Pascal | 599 lines | 26 code | 43 blank | 530 comment | 0 complexity | bdb8dcbcb33a924227d64f7776a0c934 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
1{ 2 File: CoreMIDI/MIDISetup.h 3 4 Contains: Specialized configuration-editing routines for CoreMIDI. 5 6 Copyright: (c) 2000-2008 by Apple Inc., all rights reserved. 7 8 Bugs?: For bug reports, consult the following page on 9 the World Wide Web: 10 11 http://www.freepascal.org/bugs.html 12 13} 14{ Pascal Translation: Gorazd Krosl <gorazd_1957@yahoo.ca>, October 2009 } 15{ Pascal Translation Update: Jonas Maebe <jonas@freepascal.org>, October 2012 } 16 17{ 18 Modified for use with Free Pascal 19 Version 308 20 Please report any bugs to <gpc@microbizz.nl> 21} 22 23{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE} 24{$mode macpas} 25{$packenum 1} 26{$macro on} 27{$inline on} 28{$calling mwpascal} 29 30unit MIDISetup; 31interface 32{$setc UNIVERSAL_INTERFACES_VERSION := $0400} 33{$setc GAP_INTERFACES_VERSION := $0308} 34 35{$ifc not defined USE_CFSTR_CONSTANT_MACROS} 36 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE} 37{$endc} 38 39{$ifc defined CPUPOWERPC and defined CPUI386} 40 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386} 41{$endc} 42{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN} 43 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN} 44{$endc} 45 46{$ifc not defined __ppc__ and defined CPUPOWERPC32} 47 {$setc __ppc__ := 1} 48{$elsec} 49 {$setc __ppc__ := 0} 50{$endc} 51{$ifc not defined __ppc64__ and defined CPUPOWERPC64} 52 {$setc __ppc64__ := 1} 53{$elsec} 54 {$setc __ppc64__ := 0} 55{$endc} 56{$ifc not defined __i386__ and defined CPUI386} 57 {$setc __i386__ := 1} 58{$elsec} 59 {$setc __i386__ := 0} 60{$endc} 61{$ifc not defined __x86_64__ and defined CPUX86_64} 62 {$setc __x86_64__ := 1} 63{$elsec} 64 {$setc __x86_64__ := 0} 65{$endc} 66{$ifc not defined __arm__ and defined CPUARM} 67 {$setc __arm__ := 1} 68{$elsec} 69 {$setc __arm__ := 0} 70{$endc} 71 72{$ifc defined cpu64} 73 {$setc __LP64__ := 1} 74{$elsec} 75 {$setc __LP64__ := 0} 76{$endc} 77 78 79{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__} 80 {$error Conflicting definitions for __ppc__ and __i386__} 81{$endc} 82 83{$ifc defined __ppc__ and __ppc__} 84 {$setc TARGET_CPU_PPC := TRUE} 85 {$setc TARGET_CPU_PPC64 := FALSE} 86 {$setc TARGET_CPU_X86 := FALSE} 87 {$setc TARGET_CPU_X86_64 := FALSE} 88 {$setc TARGET_CPU_ARM := FALSE} 89 {$setc TARGET_OS_MAC := TRUE} 90 {$setc TARGET_OS_IPHONE := FALSE} 91 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 92 {$setc TARGET_OS_EMBEDDED := FALSE} 93{$elifc defined __ppc64__ and __ppc64__} 94 {$setc TARGET_CPU_PPC := FALSE} 95 {$setc TARGET_CPU_PPC64 := TRUE} 96 {$setc TARGET_CPU_X86 := FALSE} 97 {$setc TARGET_CPU_X86_64 := FALSE} 98 {$setc TARGET_CPU_ARM := FALSE} 99 {$setc TARGET_OS_MAC := TRUE} 100 {$setc TARGET_OS_IPHONE := FALSE} 101 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 102 {$setc TARGET_OS_EMBEDDED := FALSE} 103{$elifc defined __i386__ and __i386__} 104 {$setc TARGET_CPU_PPC := FALSE} 105 {$setc TARGET_CPU_PPC64 := FALSE} 106 {$setc TARGET_CPU_X86 := TRUE} 107 {$setc TARGET_CPU_X86_64 := FALSE} 108 {$setc TARGET_CPU_ARM := FALSE} 109{$ifc defined(iphonesim)} 110 {$setc TARGET_OS_MAC := FALSE} 111 {$setc TARGET_OS_IPHONE := TRUE} 112 {$setc TARGET_IPHONE_SIMULATOR := TRUE} 113{$elsec} 114 {$setc TARGET_OS_MAC := TRUE} 115 {$setc TARGET_OS_IPHONE := FALSE} 116 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 117{$endc} 118 {$setc TARGET_OS_EMBEDDED := FALSE} 119{$elifc defined __x86_64__ and __x86_64__} 120 {$setc TARGET_CPU_PPC := FALSE} 121 {$setc TARGET_CPU_PPC64 := FALSE} 122 {$setc TARGET_CPU_X86 := FALSE} 123 {$setc TARGET_CPU_X86_64 := TRUE} 124 {$setc TARGET_CPU_ARM := FALSE} 125 {$setc TARGET_OS_MAC := TRUE} 126 {$setc TARGET_OS_IPHONE := FALSE} 127 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 128 {$setc TARGET_OS_EMBEDDED := FALSE} 129{$elifc defined __arm__ and __arm__} 130 {$setc TARGET_CPU_PPC := FALSE} 131 {$setc TARGET_CPU_PPC64 := FALSE} 132 {$setc TARGET_CPU_X86 := FALSE} 133 {$setc TARGET_CPU_X86_64 := FALSE} 134 {$setc TARGET_CPU_ARM := TRUE} 135 { will require compiler define when/if other Apple devices with ARM cpus ship } 136 {$setc TARGET_OS_MAC := FALSE} 137 {$setc TARGET_OS_IPHONE := TRUE} 138 {$setc TARGET_IPHONE_SIMULATOR := FALSE} 139 {$setc TARGET_OS_EMBEDDED := TRUE} 140{$elsec} 141 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.} 142{$endc} 143 144{$ifc defined __LP64__ and __LP64__ } 145 {$setc TARGET_CPU_64 := TRUE} 146{$elsec} 147 {$setc TARGET_CPU_64 := FALSE} 148{$endc} 149 150{$ifc defined FPC_BIG_ENDIAN} 151 {$setc TARGET_RT_BIG_ENDIAN := TRUE} 152 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE} 153{$elifc defined FPC_LITTLE_ENDIAN} 154 {$setc TARGET_RT_BIG_ENDIAN := FALSE} 155 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE} 156{$elsec} 157 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.} 158{$endc} 159{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE} 160{$setc CALL_NOT_IN_CARBON := FALSE} 161{$setc OLDROUTINENAMES := FALSE} 162{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE} 163{$setc OPAQUE_UPP_TYPES := TRUE} 164{$setc OTCARBONAPPLICATION := TRUE} 165{$setc OTKERNEL := FALSE} 166{$setc PM_USE_SESSION_APIS := TRUE} 167{$setc TARGET_API_MAC_CARBON := TRUE} 168{$setc TARGET_API_MAC_OS8 := FALSE} 169{$setc TARGET_API_MAC_OSX := TRUE} 170{$setc TARGET_CARBON := TRUE} 171{$setc TARGET_CPU_68K := FALSE} 172{$setc TARGET_CPU_MIPS := FALSE} 173{$setc TARGET_CPU_SPARC := FALSE} 174{$setc TARGET_OS_UNIX := FALSE} 175{$setc TARGET_OS_WIN32 := FALSE} 176{$setc TARGET_RT_MAC_68881 := FALSE} 177{$setc TARGET_RT_MAC_CFM := FALSE} 178{$setc TARGET_RT_MAC_MACHO := TRUE} 179{$setc TYPED_FUNCTION_POINTERS := TRUE} 180{$setc TYPE_BOOL := FALSE} 181{$setc TYPE_EXTENDED := FALSE} 182{$setc TYPE_LONGLONG := TRUE} 183uses MacTypes,CFBase,CFData,CFArray,MIDIServices; 184{$endc} {not MACOSALLINCLUDE} 185 186 187{$ifc TARGET_OS_MAC} 188 189{$ALIGN POWER} 190 191 192// ----------------------------------------------------------------------------- 193{! 194 @header MIDISetup.h 195 196 This header defines functions that manipulate and customize the global 197 state of the MIDI system. These functions are generally only needed by 198 applications which wish to allow the user some flexibility in how 199 the MIDI system's state is presented, and by MIDI drivers, which may 200 dynamically modify the system state as hardware is connected and 201 disconnected. 202} 203 204// ----------------------------------------------------------------------------- 205{! 206 @typedef MIDISetupRef 207 208 @discussion Derives from MIDIObjectRef, does not have an owner object. 209 210 This represents the global state of the MIDI system, 211 containing lists of the MIDI devices and serial port 212 owners. 213 214 Generally, only MIDI drivers and specialized configuration 215 editors will need to manipulate MIDISetup objects, not the 216 average MIDI client application. As of CoreMIDI 1.1, the 217 MIDIServer maintains a single global MIDISetupRef, stored 218 persistently in a preference file. 219} 220//#if __LP64__ 221{$ifc not undefined TARGET_CPU_64 and TARGET_CPU_64} 222type 223 MIDISetupRef = MIDIObjectRef; 224{$elsec} 225type 226 MIDISetupRef = ^OpaqueMIDISetup; { an opaque type } 227 OpaqueMIDISetup = record end; 228{$endif} 229 230 231// ______________________________________________________________________________ 232// MIDISetup 233// ______________________________________________________________________________ 234 235// ----------------------------------------------------------------------------- 236{! 237 @function MIDISetupCreate 238 239 @abstract Interrogates drivers, to discover what hardware is present. 240 241 As of CoreMIDI 1.1, it is usually not necessary to call 242 this function, as CoreMIDI manages a single persistent 243 MIDISetup itself. 244 245 @param outSetup 246 On successful return, points to a newly-created MIDISetup 247 object. The caller is responsible for disposing it, 248 or transferring ownership of the object back to the 249 system, with MIDISetupInstall. 250 @result An OSStatus result code. 251} 252function MIDISetupCreate( var outSetup: MIDISetupRef ): OSStatus; external name '_MIDISetupCreate'; 253(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 254 255 256// ----------------------------------------------------------------------------- 257{! 258 @function MIDISetupDispose 259 260 @abstract Dispose a MIDISetup object. 261 262 As of CoreMIDI 1.1, it is usually not necessary to call 263 this function, as CoreMIDI manages a single persistent 264 MIDISetup itself. 265 266 @param setup 267 The MIDISetup to be disposed. 268 @result An OSStatus result code. 269} 270function MIDISetupDispose( setup: MIDISetupRef ): OSStatus; external name '_MIDISetupDispose'; 271(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 272 273// ----------------------------------------------------------------------------- 274{! 275 @function MIDISetupInstall 276 277 @abstract Install a MIDISetup as the system's current state. 278 279 A client can create a MIDISetup object using 280 MIDISetupCreate, or MIDISetupFromData. This function will 281 install this state as the current state of the system, 282 possibly changing the devices visible to clients. 283 284 As of CoreMIDI 1.1, it is usually not necessary to call 285 this function, as CoreMIDI manages a single persistent 286 MIDISetup itself. 287 288 @param setup 289 The MIDISetup object to install. Ownership of this 290 object is transferred from the client to the system; the 291 client must <b>not</b> dispose of this MIDISetup. 292 @result An OSStatus result code. 293} 294function MIDISetupInstall( setup: MIDISetupRef ): OSStatus; external name '_MIDISetupInstall'; 295(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 296 297 298// ----------------------------------------------------------------------------- 299{! 300 @function MIDISetupGetCurrent 301 302 @abstract Return the system's current MIDISetup. 303 304 As of CoreMIDI 1.1, it is usually not necessary to call 305 this function, as CoreMIDI manages a single persistent 306 MIDISetup itself. 307 308 @param outSetup 309 On successful return, points to the system's most 310 recently installed MIDISetup. The system retains 311 ownership of the object; the client must <b>not</b> 312 dispose of this MIDISetup. 313 @result An OSStatus result code. 314} 315function MIDISetupGetCurrent( var outSetup: MIDISetupRef ): OSStatus; external name '_MIDISetupGetCurrent'; 316(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 317 318 319// ----------------------------------------------------------------------------- 320{! 321 @function MIDISetupToData 322 323 @abstract Create an XML representation of a MIDISetup object. 324 325 As of CoreMIDI 1.1, it is usually not necessary to call 326 this function, as CoreMIDI manages a single persistent 327 MIDISetup itself. 328 329 @param setup 330 The MIDISetup object whose XML representation is to be 331 returned. 332 @param outData 333 On successful return, points to a newly-created CFDataRef 334 containing the XML text. The client is responsible for 335 releasing this CFData object when done with it. 336 @result An OSStatus result code. 337} 338function MIDISetupToData( setup: MIDISetupRef; var outData: CFDataRef ): OSStatus; external name '_MIDISetupToData'; 339(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 340 341// ----------------------------------------------------------------------------- 342{! 343 @function MIDISetupFromData 344 345 @abstract Create a MIDISetup object from an XML stream. 346 347 As of CoreMIDI 1.1, it is usually not necessary to call 348 this function, as CoreMIDI manages a single persistent 349 MIDISetup itself. 350 351 @param data 352 The XML text from which a MIDISetup object is to be built. 353 @param outSetup 354 On successful return, points to a newly-created MIDISetup 355 object. The caller is responsible for disposing it, or 356 transferring ownership of the object back to the system, 357 with MIDISetupInstall. 358 @result An OSStatus result code. 359} 360function MIDISetupFromData( data: CFDataRef; var outSetup: MIDISetupRef ): OSStatus; external name '_MIDISetupFromData'; 361(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 362 363// ----------------------------------------------------------------------------- 364{! 365 @function MIDIDeviceAddEntity 366 367 @discussion Drivers call this function to specify one of the entities that 368 comprise a device. 369 370 Non-drivers may call this function as of CoreMIDI 1.1, to 371 add entities to external devices. 372 373 @param device 374 The device to which an entity is to be added. 375 @param name 376 The name of the new entity. 377 @param embedded 378 True if this entity is inside the device, false if the 379 entity simply consists of external connectors to which 380 other devices can be attached. 381 @param numSourceEndpoints 382 The number of source endpoints the entity has. 383 @param numDestinationEndpoints 384 The number of destination endpoints the entity has. 385 @param newEntity 386 On successful return, points to the newly-created entity. 387 @result An OSStatus result code. 388} 389function MIDIDeviceAddEntity( device: MIDIDeviceRef; name: CFStringRef; embedded: Boolean; numSourceEndpoints: ItemCount; numDestinationEndpoints: ItemCount; var newEntity: MIDIEntityRef ): OSStatus; external name '_MIDIDeviceAddEntity'; 390(* __OSX_AVAILABLE_STARTING(__MAC_10_0, __IPHONE_NA) *) 391 392// ----------------------------------------------------------------------------- 393{! 394 @function MIDIDeviceRemoveEntity 395 396 @discussion Drivers may call this function to remove one of a device's 397 entities. 398 399 New for CoreMIDI 1.1. 400 401 @param device 402 The device from which an entity is to be removed. 403 @param entity 404 The entity to be removed. 405 @result An OSStatus result code. 406} 407function MIDIDeviceRemoveEntity( device: MIDIDeviceRef; entity: MIDIEntityRef ): OSStatus; external name '_MIDIDeviceRemoveEntity'; 408(* __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_NA) *) 409 410// ----------------------------------------------------------------------------- 411{! 412 @function MIDIEntityAddOrRemoveEndpoints 413 414 @discussion Drivers and configuration editors may call this function to add to 415 or remove an entity's endpoints. 416 417 New for CoreMIDI 1.3. 418 419 @param entity 420 The entity whose endpoints are to be manipulated. 421 @param numSourceEndpoints 422 The desired new number of source endpoints. 423 @param numDestinationEndpoints 424 The desired new number of destination endpoints. 425 @result An OSStatus result code. 426} 427function MIDIEntityAddOrRemoveEndpoints( entity: MIDIEntityRef; numSourceEndpoints: ItemCount; numDestinationEndpoints: ItemCount ): OSStatus; external name '_MIDIEntityAddOrRemoveEndpoints'; 428(* __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_NA) *) 429 430// ----------------------------------------------------------------------------- 431{! 432 @function MIDISetupAddDevice 433 434 @abstract Adds a driver-owner MIDI device to the current MIDISetup 435 436 @discussion Only MIDI drivers may make this call; it is in this header 437 file only for consistency with MIDISetupRemoveDevice. 438 439 New for CoreMIDI 1.1. 440 441 @param device 442 The device to be added. 443} 444function MIDISetupAddDevice( device: MIDIDeviceRef ): OSStatus; external name '_MIDISetupAddDevice'; 445(* __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_NA) *) 446 447// ----------------------------------------------------------------------------- 448{! 449 @function MIDISetupRemoveDevice 450 451 @abstract Removes a driver-owned MIDI device from the current MIDISetup 452 453 @discussion Generally this should only be called from a studio configuration 454 editor, to remove a device which is offline and which the user 455 has specified as being permanently missing. 456 457 Instead of removing devices from the setup, drivers should 458 set the device's kMIDIPropertyOffline to 1 so that if the 459 device reappears later, none of its properties are lost. 460 461 New for CoreMIDI 1.1. 462 463 @param device 464 The device to be added. 465} 466function MIDISetupRemoveDevice( device: MIDIDeviceRef ): OSStatus; external name '_MIDISetupRemoveDevice'; 467(* __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_NA) *) 468 469// ----------------------------------------------------------------------------- 470{! 471 @function MIDISetupAddExternalDevice 472 473 @abstract Adds an external MIDI device to the current MIDISetup 474 475 @discussion Useful for a studio configuration editor. New for CoreMIDI 1.1. 476 477 @param device 478 The device to be added. 479} 480function MIDISetupAddExternalDevice( device: MIDIDeviceRef ): OSStatus; external name '_MIDISetupAddExternalDevice'; 481(* __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_NA) *) 482 483// ----------------------------------------------------------------------------- 484{! 485 @function MIDISetupRemoveExternalDevice 486 487 @abstract Removes an external MIDI device from the current MIDISetup 488 489 @discussion Useful for a studio configuration editor. New for CoreMIDI 1.1. 490 491 @param device 492 The device to be removed. 493} 494function MIDISetupRemoveExternalDevice( device: MIDIDeviceRef ): OSStatus; external name '_MIDISetupRemoveExternalDevice'; 495(* __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_NA) *) 496 497// ----------------------------------------------------------------------------- 498{! 499 @function MIDIGetSerialPortOwner 500 501 @abstract Returns the MIDI driver that owns a serial port. 502 503 @discussion The current MIDISetup tracks ownership of serial ports 504 to one of the MIDI drivers installed in the system. 505 506 Serial ports can be enumerated using IOServiceMatching( 507 kIOSerialBSDServiceValue). The port's unique name is 508 the IOService's kIOTTYDeviceKey property. 509 510 New for CoreMIDI 1.1. 511 512 A previous version of this documentation specified an incorrect 513 key for obtaining the port's unique name (IOTTYBaseName). 514 515 @param portName 516 The name of a serial port. 517 @param outDriverName 518 On exit, the name of the driver owning the port, 519 or NULL if no driver owns it. 520 521 @result An OSStatus result code. 522} 523function MIDIGetSerialPortOwner( portName: CFStringRef; var outDriverName: CFStringRef ): OSStatus; external name '_MIDIGetSerialPortOwner'; 524(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 525 526// ----------------------------------------------------------------------------- 527{! 528 @function MIDISetSerialPortOwner 529 530 @abstract Specifies the MIDI driver that owns a serial port. 531 532 @discussion Use this to assign ownership of a serial port 533 to one of the MIDI drivers installed in the system. 534 535 New for CoreMIDI 1.1. 536 537 @param portName 538 The name of a serial port. 539 @param driverName 540 The name of the driver that owns the serial port, 541 or NULL to specify that no driver owns it. 542 543 @result An OSStatus result code. 544} 545function MIDISetSerialPortOwner( portName: CFStringRef; driverName: CFStringRef ): OSStatus; external name '_MIDISetSerialPortOwner'; 546(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 547 548// ----------------------------------------------------------------------------- 549{! 550 @function MIDIGetSerialPortDrivers 551 552 @abstract Returns a list of installed MIDI drivers for serial port 553 MIDI devices. 554 555 @discussion Use this to determine which of the installed MIDI drivers 556 are for devices which may attach to serial ports. 557 558 New for CoreMIDI 1.1. 559 560 @param outDriverNames 561 On exit, a CFArrayRef containing a list of CFStringRef's 562 which are the names of the serial port MIDI drivers. 563 The array should be released by the caller. 564 565 @result An OSStatus result code. 566} 567function MIDIGetSerialPortDrivers( var outDriverNames: CFArrayRef ): OSStatus; external name '_MIDIGetSerialPortDrivers'; 568(* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_NA, __IPHONE_NA) *) 569 570// ----------------------------------------------------------------------------- 571{! 572 @function MIDIExternalDeviceCreate 573 574 @abstract Create a new external MIDI device. 575 576 @discussion Non-drivers may call this function as of CoreMIDI 1.1, to 577 create external devices. 578 579 The new device is not added to the current MIDISetupRef; 580 to do this, use MIDISetupAddExternalDevice. 581 582 @param name 583 The name of the new device. 584 @param manufacturer 585 The name of the device's manufacturer. 586 @param model 587 The device's model name. 588 @param outDevice 589 On successful return, points to the newly-created device. 590 @result An OSStatus result code. 591} 592function MIDIExternalDeviceCreate( name: CFStringRef; manufacturer: CFStringRef; model: CFStringRef; var outDevice: MIDIDeviceRef ): OSStatus; external name '_MIDIExternalDeviceCreate'; 593(* __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_NA) *) 594 595 596{$endc} { TARGET_OS_MAC }{$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE} 597 598end. 599{$endc} {not MACOSALLINCLUDE}