---
title: AddObject
framework: audiodriverkit
role: symbol
role_heading: Instance Method
path: audiodriverkit/iouseraudiodriver/addobject
---

# AddObject

Adds an audio object to the driver.

## Declaration

```occ
kern_return_t AddObject(IOUserAudioObject *in_object);
```

## Parameters

- `in_object`: The doc://com.apple.audiodriverkit/documentation/AudioDriverKit/AudioDriverKit/IOUserAudioObjectID to add to the driver.

## 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 Use this method to add to the driver any objects that require management by the host. If the add succeeds, the object’s reference count increments by one. The caller should also call PropertiesChanged to notify the host of any changes.

## See Also

### Working with Audio Objects

- [RemoveObject](audiodriverkit/iouseraudiodriver/removeobject.md)
- [GetAudioObjectForObjectID](audiodriverkit/iouseraudiodriver/getaudioobjectforobjectid.md)
