<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreSpotlight",
  "identifier" : "/documentation/CoreSpotlight/CSSearchableItemAttributeSet/bitsPerSample",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Spotlight",
      "CoreSpotlight"
    ],
    "preciseIdentifier" : "c:objc(cs)CSSearchableItemAttributeSet(py)bitsPerSample"
  },
  "title" : "bitsPerSample"
}
-->

# bitsPerSample

The number of bits per sample.

```
var bitsPerSample: NSNumber? { get set }
```

## Discussion

The value of this property can represent the bit depth of an image (such as 8-bit or 16-bit) or the bit depth per audio sample of uncompressed audio data (such as 8, 16, 24, 32, 64, and so on).

---

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)