<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PHASE",
  "identifier" : "/documentation/PHASE/PHASEAssetRegistry",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "PHASE"
    ],
    "preciseIdentifier" : "c:objc(cs)PHASEAssetRegistry"
  },
  "title" : "PHASEAssetRegistry"
}
-->

# PHASEAssetRegistry

A central repository of audio assets.

```
class PHASEAssetRegistry
```

## Overview

This class manages audio by registering two types of assets throughout the app’s life cycle:

- [`PHASESoundAsset`](/documentation/PHASE/PHASESoundAsset) : A sound asset identifies the particular audio data that your app intends to play.
- [`PHASESoundEventNodeAsset`](/documentation/PHASE/PHASESoundEventNodeAsset): A sound event asset provides audio with an avenue to the output device, and either represents a single sound or a dynamic set of sounds that play individually, depending on the app’s state.

When you’re done with a sound asset, call [`unregisterAsset(identifier:completion:)`](/documentation/PHASE/PHASEAssetRegistry/unregisterAsset(identifier:completion:)) to free up its system resources.

## Topics

### Registering Sound Assets

Load shared audio data that your app can access and play from any scope.

[`func registerSoundAsset(url: URL, identifier: String?, assetType: PHASEAsset.AssetType, channelLayout: AVAudioChannelLayout?, normalizationMode: PHASENormalizationMode) throws -> PHASESoundAsset`](/documentation/PHASE/PHASEAssetRegistry/registerSoundAsset(url:identifier:assetType:channelLayout:normalizationMode:))

Loads a sound asset from the argument URL and adds it to the engine’s list of registered assets.

[`func registerSoundAsset(data: Data, identifier: String?, format: AVAudioFormat, normalizationMode: PHASENormalizationMode) throws -> PHASESoundAsset`](/documentation/PHASE/PHASEAssetRegistry/registerSoundAsset(data:identifier:format:normalizationMode:))

Loads a sound asset from memory and adds it to the engine’s list of registered assets.

[`func unregisterAsset(identifier: String, completion: ((Bool) -> Void)?)`](/documentation/PHASE/PHASEAssetRegistry/unregisterAsset(identifier:completion:))

Deallocates system memory for a given asset and removes it from the engine’s list of registered assets.

### Registering Sound Event Assets

Define playback objects that your app invokes for one-time audio output, or a sophisticated hierarchy that varies the output based on your app’s state.

[`func registerSoundEventAsset(rootNode: PHASESoundEventNodeDefinition, identifier: String?) throws -> PHASESoundEventNodeAsset`](/documentation/PHASE/PHASEAssetRegistry/registerSoundEventAsset(rootNode:identifier:))

Registers the root node of the sound event asset.

[`func asset(forIdentifier: String) -> PHASEAsset?`](/documentation/PHASE/PHASEAssetRegistry/asset(forIdentifier:))

Provides the asset named with the designated identifier.

### Registering Global Metaparameters

Centralize audio parameters that change the charactaristics of in-flight audio, and synchronize across multiple playback events.

[`func registerGlobalMetaParameter(metaParameterDefinition: PHASEMetaParameterDefinition) throws -> PHASEGlobalMetaParameterAsset`](/documentation/PHASE/PHASEAssetRegistry/registerGlobalMetaParameter(metaParameterDefinition:))

Registers a global metaparameter with the asset registry.

[`var globalMetaParameters: [String : PHASEMetaParameter]`](/documentation/PHASE/PHASEAssetRegistry/globalMetaParameters)

A dictionary of metaparameters that all sound event assets share.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)