AudioClipExt.FromPcmBytesAsync Method
Creates an AudioClip from a PCM byte array asynchronously.
Namespace: UltimateXR.Extensions.Unity.Audio
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Task<AudioClip> FromPcmBytesAsync(
byte[] bytes,
string clipName = "pcm",
CancellationToken ct = default
)
Parameters
- bytes
- Type: System.Byte[]
The source data - clipName (Optional)
- Type: System.String
The name assigned to the clip - ct (Optional)
- Type: System.Threading.CancellationToken
The optional cancellation token, to cancel the task
Return Value
Type: Task(AudioClip)
An awaitable task that returns the AudioClip object
See Also
Reference
AudioClipExt Class
UltimateXR.Extensions.Unity.Audio Namespace