---
title: "init(fileNamed:)"
framework: scenekit
role: symbol
role_heading: Initializer
path: "scenekit/scnaudiosource/init(filenamed:)"
---

# init(fileNamed:)

Initializes an audio source from an audio file in the application’s main bundle.

## Declaration

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

## Parameters

- `name`: The name of an audio file in the application’s main bundle.

## Return Value

Return Value A new audio source object.

## Discussion

Discussion Calling this method is equivalent to using the Bundle class to locate an audio file in the application’s main bundle and then passing the resulting URL to the init(url:) method.

## See Also

### Creating an Audio Source

- [init(named:)](scenekit/scnaudiosource/init(named:).md)
- [init(url:)](scenekit/scnaudiosource/init(url:)-3qyjs.md)
