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

# IOUserAudioLevelControl

A control object that supports setting an audio level, with either scalar or decibel values.

```
class IOUserAudioLevelControl;
```

## Topics

### Creating a Level Control

[`static OSSharedPtr<IOUserAudioLevelControl> Create(IOUserAudioDriver *in_driver, bool in_is_settable, float in_decibel_value, IOUserAudioLevelControlRange in_decibel_range, IOUserAudioObjectPropertyElement in_control_element, IOUserAudioObjectPropertyScope in_control_scope, IOUserAudioClassID in_control_class_id);`](/documentation/AudioDriverKit/IOUserAudioLevelControl/Create)

Allocates and initializes an instance of the level control class.

[`virtual bool init(IOUserAudioDriver *in_driver, bool in_is_settable, float in_decibel_value, IOUserAudioLevelControlRange in_decibel_range, IOUserAudioObjectPropertyElement in_control_element, IOUserAudioObjectPropertyScope in_control_scope, IOUserAudioClassID in_control_class_id);`](/documentation/AudioDriverKit/IOUserAudioLevelControl/init)

Initializes an instance of a level control.

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

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

[`struct IOUserAudioLevelControlRange;`](/documentation/AudioDriverKit/IOUserAudioLevelControlRange)

A type that indicates minimum and maximum values for level controls.

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

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

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

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

### Freeing a Level Control

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

Frees the level control.

### Getting Information About the Class

[`virtual IOUserAudioClassID GetClassID();`](/documentation/AudioDriverKit/IOUserAudioLevelControl/GetClassID)

Gets the audio class identifier of the object.

[`virtual IOUserAudioClassID GetBaseClassID();`](/documentation/AudioDriverKit/IOUserAudioLevelControl/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.

### Supporting Value Changes

[`virtual kern_return_t HandleChangeScalarValue(float in_scalar_value);`](/documentation/AudioDriverKit/IOUserAudioLevelControl/HandleChangeScalarValue)

Tells the slider control the scalar value is changing.

[`virtual kern_return_t HandleChangeDecibelValue(float in_decibel_value);`](/documentation/AudioDriverKit/IOUserAudioLevelControl/HandleChangeDecibelValue)

Tells the slider control the decibel value is changing.

### Accessing the Value

[`kern_return_t SetScalarValue(float in_scalar);`](/documentation/AudioDriverKit/IOUserAudioLevelControl/SetScalarValue)

Sets the scalar value of the level control.

[`float GetScalarValue();`](/documentation/AudioDriverKit/IOUserAudioLevelControl/GetScalarValue)

Gets the scalar value of the level control.

[`kern_return_t SetDecibelValue(float in_decibel_value);`](/documentation/AudioDriverKit/IOUserAudioLevelControl/SetDecibelValue)

Sets the decibel value of the level control.

[`float GetDecibelValue();`](/documentation/AudioDriverKit/IOUserAudioLevelControl/GetDecibelValue)

Gets the decibel value of the level control.

## Relationships

### Inherits From

[`IOUserAudioControl`](/documentation/AudioDriverKit/IOUserAudioControl)

---

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)