---
title: "setAllowsSleeping(_:)"
framework: Core Audio
role: symbol
role_heading: Instance Method
platforms: [macOS 15.0+]
path: "coreaudio/audiohardwaresystem/setallowssleeping(_:)"
---

# setAllowsSleeping(_:)

Set the allowsSleeping property.

## Declaration

```swift
func setAllowsSleeping(_ allowed: Bool) throws
```

## Parameters

- `allowed`: A Bool where true indicates that the process will allow the CPU to idle sleep even if there is audio IO in progress.
