---
title: "MIDIDeviceListAddDevice(_:_:)"
framework: coremidi
role: symbol
role_heading: Function
path: "coremidi/mididevicelistadddevice(_:_:)"
---

# MIDIDeviceListAddDevice(_:_:)

Adds the specified device to the device list.

## Declaration

```swift
func MIDIDeviceListAddDevice(_ devList: MIDIDeviceListRef, _ dev: MIDIDeviceRef) -> OSStatus
```

## Parameters

- `devList`: The device list.
- `dev`: The device to add to the list.

## Return Value

Return Value An OSStatus result code.

## See Also

### Managing Device Lists

- [MIDIDeviceListGetNumberOfDevices(_:)](coremidi/mididevicelistgetnumberofdevices(_:).md)
- [MIDIDeviceListGetDevice(_:_:)](coremidi/mididevicelistgetdevice(_:_:).md)
- [MIDIDeviceListDispose(_:)](coremidi/mididevicelistdispose(_:).md)
- [MIDIDeviceListRef](coremidi/mididevicelistref.md)
