<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioDriverKit",
  "identifier" : "/documentation/AudioDriverKit/IOUserAudioDriver",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "AudioDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserAudioDriver"
  },
  "title" : "IOUserAudioDriver"
}
-->

# IOUserAudioDriver

A DriverKit provider object that manages communications with an audio device.

```
class IOUserAudioDriver;
```

## Overview

For the Core Audio host to match against this driver, add the following keys to `IOKitPersonalities`, in the driver’s `Info.plist` file:

```swift
 <key>IOUserAudioDriverUserClientProperties</key>
 <dict>
     <key>IOClass</key>
     <string>IOUserUserClient</string>
     <key>IOUserClass</key>
     <string>IOUserAudioDriverUserClient</string>
 </dict>
```

After matching the host with the driver, the AudioDriverKit framework creates the connection to the Core Audio HAL as soon as the <doc://com.apple.documentation/documentation/DriverKit/IOService> calls [`NewUserClient`](/documentation/AudioDriverKit/IOUserAudioDriver/NewUserClient). The driver extension must have the `com.apple.developer.driverkit.allow-any-userclient-access` entitlement.

## Topics

### Running the Driver Service

[`virtual bool init();`](/documentation/AudioDriverKit/IOUserAudioDriver/init)

Handles the basic initialization of the service.

[`virtual kern_return_t Start(IOService *provider);`](/documentation/AudioDriverKit/IOUserAudioDriver/Start)

Starts the current service and associates it with the specified provider.

[`virtual kern_return_t Stop(IOService *provider);`](/documentation/AudioDriverKit/IOUserAudioDriver/Stop)

Stops the service associated with the specified provider.

[`virtual void free();`](/documentation/AudioDriverKit/IOUserAudioDriver/free)

Performs any final cleanup for the service.

### Getting Information About the Class

[`IOUserAudioClassID GetClassID();`](/documentation/AudioDriverKit/IOUserAudioDriver/GetClassID)

Gets the audio class identifier of the object.

[`IOUserAudioClassID GetBaseClassID();`](/documentation/AudioDriverKit/IOUserAudioDriver/GetBaseClassID)

Gets the audio class identifier of the base class object.

[`enum IOUserAudioClassID : uint32_t;`](/documentation/AudioDriverKit/AudioDriverKit/IOUserAudioClassID)

An identifier for the type of audio object.

[`OSSharedPtr<IODispatchQueue> GetWorkQueue();`](/documentation/AudioDriverKit/IOUserAudioDriver/GetWorkQueue)

Gets the work queue created by the audio object, as a pointer to a dispatch queue.

[`OSSharedPtr<OSString> GetName();`](/documentation/AudioDriverKit/IOUserAudioDriver/GetName)

Gets the name of the driver.

[`kern_return_t SetName(OSString *in_name);`](/documentation/AudioDriverKit/IOUserAudioDriver/SetName)

Sets the name of the driver.

### Getting the Driver’s Audio Object Identifier

[`constexpr const IOUserAudioObjectID kIOUserAudioObjectIDDriver;`](/documentation/AudioDriverKit/AudioDriverKit/kIOUserAudioObjectIDDriver)

The audio object ID of the driver.

### Starting and Stopping the Driver

[`virtual kern_return_t StartDevice(IOUserAudioObjectID in_object_id, IOUserAudioStartStopFlags in_flags);`](/documentation/AudioDriverKit/IOUserAudioDriver/StartDevice)

Tells the driver to start I/O on an audio device or audio clock device.

[`virtual kern_return_t StopDevice(IOUserAudioObjectID in_object_id, IOUserAudioStartStopFlags in_flags);`](/documentation/AudioDriverKit/IOUserAudioDriver/StopDevice)

Tells the driver to stop I/O on an audio device or audio clock device.

[`typedef uint32_t IOUserAudioObjectID;`](/documentation/AudioDriverKit/AudioDriverKit/IOUserAudioObjectID)

An identifier that provides a handle on a specific audio object.

[`enum IOUserAudioStartStopFlags : uint64_t;`](/documentation/AudioDriverKit/AudioDriverKit/IOUserAudioStartStopFlags)

Values that indicate I/O starts or stops.

### Creating a New Client

[`virtual kern_return_t NewUserClient(uint32_t in_type, IOUserClient **out_user_client);`](/documentation/AudioDriverKit/IOUserAudioDriver/NewUserClient)

Requests the creation of a new user client for the service.

### Working with Transport Type

[`IOUserAudioTransportType GetTransportType();`](/documentation/AudioDriverKit/IOUserAudioDriver/GetTransportType)

Gets the transport type of the driver.

[`kern_return_t SetTransportType(IOUserAudioTransportType in_transport_type);`](/documentation/AudioDriverKit/IOUserAudioDriver/SetTransportType)

Set the transport type of the driver.

[`enum IOUserAudioTransportType : uint32_t;`](/documentation/AudioDriverKit/AudioDriverKit/IOUserAudioTransportType)

The type of transport to deliver audio.

### Working with Audio Objects

[`kern_return_t AddObject(IOUserAudioObject *in_object);`](/documentation/AudioDriverKit/IOUserAudioDriver/AddObject)

Adds an audio object to the driver.

[`kern_return_t RemoveObject(IOUserAudioObject *in_object);`](/documentation/AudioDriverKit/IOUserAudioDriver/RemoveObject)

Removes an audio object from the driver.

[`OSSharedPtr<IOUserAudioObject> GetAudioObjectForObjectID(IOUserAudioObjectID in_object_id);`](/documentation/AudioDriverKit/IOUserAudioDriver/GetAudioObjectForObjectID)

Gets a pointer to an audio object, given the object’s identifier.

### Communicating with the Host

[`kern_return_t PropertiesChanged(IOUserAudioObjectID in_object_id, IOUserAudioObjectPropertySelector *in_properties, uint32_t in_num_properties);`](/documentation/AudioDriverKit/IOUserAudioDriver/PropertiesChanged)

Informs the host when the state of an object in the driver changes.

[`typedef uint32_t IOUserAudioObjectPropertySelector;`](/documentation/AudioDriverKit/AudioDriverKit/IOUserAudioObjectPropertySelector)

A four character code which, along with the scope and element, specific piece of information about an audio object.

### Working with Custom Properties

[`kern_return_t AddCustomProperty(IOUserAudioCustomProperty *in_custom_property);`](/documentation/AudioDriverKit/IOUserAudioDriver/AddCustomProperty)

Adds a custom property object to the driver.

[`kern_return_t RemoveCustomProperty(IOUserAudioCustomProperty *in_custom_property);`](/documentation/AudioDriverKit/IOUserAudioDriver/RemoveCustomProperty)

Removes a previously-added custom property object from the driver.

[`class IOUserAudioCustomProperty;`](/documentation/AudioDriverKit/IOUserAudioCustomProperty)

A custom property to associate with audio objects.

## Relationships

### Inherits From

[`IOService`](/documentation/DriverKit/IOService)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)