<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKAudioNode/init(fileNamed:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKAudioNode(im)initWithFileNamed:"
  },
  "title" : "init(fileNamed:)"
}
-->

# init(fileNamed:)

Initializes an audio node from an audio asset with the specified filename.

```
convenience init(fileNamed name: String)
```

## Parameters

`name`

A file containing an <doc://com.apple.documentation/documentation/AVFAudio/AVAudioNode>.

## Return Value

A newly initialized audio node.

## Discussion

The named file containing the audio asset must reside within the main bundle.

---

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)