Interface IAudioFactory
A factory to load audio clips from files.
Namespace: AGS.API
Assembly: AGS.API.dll
Syntax
public interface IAudioFactory
Methods
| Improve this Doc View SourceLoadAudioClip(String, String)
Loads the audio clip from the file/resource path.
Declaration
IAudioClip LoadAudioClip(string filePath, string id = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | File path. |
| System.String | id | A unique identifier for the clip, if null, the file/resource path will be used as id. |
Returns
| Type | Description |
|---|---|
| IAudioClip | The audio clip. |
LoadAudioClipAsync(String, String)
Loads the audio clip from the file/resource path asynchronously.
Declaration
Task<IAudioClip> LoadAudioClipAsync(string filePath, string id = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | File path. |
| System.String | id | A unique identifier for the clip, if null, the file/resource path will be used as id. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task<IAudioClip> | The audio clip. |