<!--
{
  "availability" : [
    "iOS: 13.0.0 - 18.0.0",
    "iPadOS: 13.0.0 - 18.0.0",
    "macCatalyst: 13.0.0 - 18.0.0",
    "macOS: 10.15.0 - 15.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/AudioFileResource/load(named:in:inputMode:loadingStrategy:shouldLoop:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation17AudioFileResourceC4load5named2in9inputMode15loadingStrategy10shouldLoopACSS_So8NSBundleCSgAA0cE0C05InputJ0OAC07LoadingL0OSbtKFZ"
  },
  "title" : "load(named:in:inputMode:loadingStrategy:shouldLoop:)"
}
-->

# load(named:in:inputMode:loadingStrategy:shouldLoop:)

Synchronously loads an audio resource.

```
@MainActor @preconcurrency static func load(named name: String, in bundle: Bundle? = nil, inputMode: AudioResource.InputMode = .spatial, loadingStrategy: AudioFileResource.LoadingStrategy = .preload, shouldLoop: Bool = false) throws -> AudioFileResource
```

---

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)