AudioClipExt.FromPcmFile Method

Asynchronously reads and loads an AudioClip into memory from a given uri pointing to a file with PCM bytes.

Namespace: UltimateXR.Extensions.Unity.Audio
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0

Syntax

C#

public static Task<AudioClip> FromPcmFile(
	string uri,
	CancellationToken ct = default
)


Parameters

 

uri
Type: System.String
Full path with the PCM bytes
ct (Optional)
Type: System.Threading.CancellationToken
Optional cancellation token to cancel the task

Return Value

Type: Task(AudioClip)
Loaded AudioClip

Exceptions

ExceptionCondition
HttpUwrExceptionHttpError flag is on
NetUwrExceptionNetworkError flag is on
OperationCanceledExceptionThe task was canceled using ct

See Also

Reference

AudioClipExt Class
UltimateXR.Extensions.Unity.Audio Namespace