<!--
{
  "availability" : [
    "DriverKit: 21.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AudioDriverKit",
  "identifier" : "/documentation/AudioDriverKit/IOUserAudioDriver/StopDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AudioDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserAudioDriver@F@StopDevice#i#$@N@AudioDriverKit@E@IOUserAudioStartStopFlags#"
  },
  "title" : "StopDevice"
}
-->

# StopDevice

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

```
virtual kern_return_t StopDevice(IOUserAudioObjectID in_object_id, IOUserAudioStartStopFlags in_flags);
```

## Parameters

`in_object_id`

The identifier of the device on which to stop I/O.

`in_flags`

A flag that indicates how to perform the I/O stop operation.

## Return Value

<doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess> on success, or another value if an error occurs. For a list of error codes, see <doc://com.apple.documentation/documentation/DriverKit/error-codes>.

## Discussion

The default implementation always returns <doc://com.apple.documentation/documentation/DriverKit/kIOReturnSuccess>. Subclass and override this method to handle hardware-specific stopping, then call the superclass to update the I/O state.

This call results in a call to [`StopIO`](/documentation/AudioDriverKit/IOUserAudioDevice/StopIO) on the device.

---

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)