Class AudioUtils
A class containing helper methods for audio related tasks
Inheritance
System.Object
AudioUtils
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: LLBML.Audio
Assembly: LLBModdingLib.dll
Syntax
public static class AudioUtils
Methods
GetAssetSynchronously(String)
Loads an UnityEngine.AudioClip synchronously
Declaration
public static AudioAsset GetAssetSynchronously(string musicFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | musicFilePath | The path of the audio file to load |
Returns
| Type | Description |
|---|---|
| AudioAsset | The loaded AudioAsset |
Remarks
Prefer using an AudioCache to load clips as it is a very slow operation, potentially blocking execution.
See Also
GetAudioInfos(DirectoryInfo)
Searches a directory for audio files
Declaration
public static List<AudioInfo> GetAudioInfos(DirectoryInfo dir)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.DirectoryInfo | dir | The path of the directory to search |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<AudioInfo> | A list of gathered AudioInfo in the directory |
GetClipSynchronously(String)
Loads an UnityEngine.AudioClip synchronously
Declaration
public static AudioClip GetClipSynchronously(string musicFilePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | musicFilePath | The path of the audio file to load |
Returns
| Type | Description |
|---|---|
| UnityEngine.AudioClip | The loaded UnityEngine.AudioClip |
Remarks
Prefer using an AudioCache to load clips as it is a very slow operation, potentially blocking execution.