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

# init(named:)

Returns the audio source associated with the specified filename.

## Declaration

```swift
convenience init?(named fileName: String)
```

## Parameters

- `fileName`: The name of an audio file. If this filename has not been previously requested, the method looks for an audio file with the specified name in the application’s main bundle.

## Return Value

Return Value An audio source object.

## Discussion

Discussion This method looks in the system caches for an audio source with the specified name and returns that object if it exists. If a matching audio source is not already in the cache, this method locates the audio file with the specified name in the application’s main bundle, then creates a new audio source and caches it for reuse.

## See Also

### Creating an Audio Source

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