---
title: setValue
framework: kernel
role: pseudoSymbol
path: kernel/ioaudiocontrol/1812307-setvalue
---

# setValue

Sets the value for this control.

## Declaration

```occ
virtual IOReturn setValue(
 OSObject *newValue); 
```

## Parameters

- `newValue`: The new value for this control.

## Return Value

Return Value Returns kIOReturnSuccess if the value is successfully set.

## Overview

Overview When the control's value is changed, a call is made to performValueChange(). If that call succeeds, the value is set and sendValueChangeNotification() is called to send a notification to the user clients. This function must be called on the IOWorkLoop.

## See Also

### Miscellaneous

- [addUserClient](kernel/ioaudiocontrol/1812069-adduserclient.md)
- [addUserClientAction](kernel/ioaudiocontrol/1812079-adduserclientaction.md)
- [clientClosed](kernel/ioaudiocontrol/1812087-clientclosed.md)
- [createUserClient(task_t, void *, UInt32, IOAudioControlUserClient **)](kernel/ioaudiocontrol/1812095-createuserclient.md)
- [createUserClient(task_t, void *, UInt32, IOAudioControlUserClient **, OSDictionary *)](kernel/ioaudiocontrol/1812104-createuserclient.md)
- [detachUserClientsAction](kernel/ioaudiocontrol/1812113-detachuserclientsaction.md)
- [flushValue](kernel/ioaudiocontrol/1812123-flushvalue.md)
- [free](kernel/ioaudiocontrol/1812130-free.md)
- [getChannelID](kernel/ioaudiocontrol/1812135-getchannelid.md)
- [getCommandGate](kernel/ioaudiocontrol/1812146-getcommandgate.md)
- [getControlID](kernel/ioaudiocontrol/1812156-getcontrolid.md)
- [getIsStarted](kernel/ioaudiocontrol/1812169-getisstarted.md)
- [getValue](kernel/ioaudiocontrol/1812181-getvalue.md)
- [getWorkLoop](kernel/ioaudiocontrol/1812197-getworkloop.md)
- [hardwareValueChanged](kernel/ioaudiocontrol/1812208-hardwarevaluechanged.md)
- [init](kernel/ioaudiocontrol/1812219-init.md)
- [newUserClient](kernel/ioaudiocontrol/1812229-newuserclient.md)
- [performValueChange](kernel/ioaudiocontrol/1812237-performvaluechange.md)
- [removeUserClient](kernel/ioaudiocontrol/1812247-removeuserclient.md)
- [removeUserClientAction](kernel/ioaudiocontrol/1812259-removeuserclientaction.md)
- [sendValueChangeNotification](kernel/ioaudiocontrol/1812267-sendvaluechangenotification.md)
- [setChannelID](kernel/ioaudiocontrol/1812275-setchannelid.md)
- [setChannelName](kernel/ioaudiocontrol/1812281-setchannelname.md)
- [setControlID](kernel/ioaudiocontrol/1812283-setcontrolid.md)
- [setProperties](kernel/ioaudiocontrol/1812287-setproperties.md)
- [setReadOnlyFlag](kernel/ioaudiocontrol/1812291-setreadonlyflag.md)
- [setSubType(UInt32)](kernel/ioaudiocontrol/1812293-setsubtype.md)
- [setType(UInt32)](kernel/ioaudiocontrol/1812300-settype.md)
- [setUsage](kernel/ioaudiocontrol/1812305-setusage.md)
- [setValueAction](kernel/ioaudiocontrol/1812310-setvalueaction.md)
- [start](kernel/ioaudiocontrol/1812313-start.md)
- [stop](kernel/ioaudiocontrol/1812316-stop.md)
- [updateValue](kernel/ioaudiocontrol/1812319-updatevalue.md)
- [validateValue](kernel/ioaudiocontrol/1812322-validatevalue.md)
- [withAttributes](kernel/ioaudiocontrol/1812328-withattributes.md)
