---
title: AddDevice
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudiobox/adddevice
---

# AddDevice

Adds an audio device to the audio box.

## Declaration

```occ
kern_return_t AddDevice(IOUserAudioDevice *in_device);
```

## Parameters

- `in_device`: The doc://com.apple.audiodriverkit/documentation/AudioDriverKit/IOUserAudioDevice to associate with the box.

## Return Value

Return Value kIOReturnSuccess on success, or another value if an error occurs. For a list of error codes, see Error Codes.

## Discussion

Discussion The box doesn’t own the device. If adding the device succeeds, the device’s reference count increments by one.

## See Also

### Managing Box Contents

- [RemoveDevice](audiodriverkit/iouseraudiobox/removedevice.md)
- [IOUserAudioDevice](audiodriverkit/iouseraudiodevice.md)
- [AddClockDevice](audiodriverkit/iouseraudiobox/addclockdevice.md)
- [RemoveClockDevice](audiodriverkit/iouseraudiobox/removeclockdevice.md)
- [IOUserAudioClockDevice](audiodriverkit/iouseraudioclockdevice.md)
