Method
Module.CreateAudioClipStream(AudioClip.PCMReaderCallback, AudioClip.PCMSetPositionCallback, ChannelCount, int, float, float)

Summary

Syntax

public AudioClip CreateAudioClipStream(AudioClip.PCMReaderCallback pcmReaderCallback, AudioClip.PCMSetPositionCallback pcmSetPositionCallback, ChannelCount channelCount = Stereo, int sampleRate = 0, float from = 0, float duration = -Infinity)

Parameters

Name Type Description
pcmReaderCallback AudioClip.PCMReaderCallback Callback function to read PCM data.
pcmSetPositionCallback AudioClip.PCMSetPositionCallback Callback function to set PCM data position.
channelCount ChannelCount The number of audio channels (default is Stereo).
sampleRate int The audio sample rate (default is 0, meaning the current output sample rate).
from float The starting position in seconds (default is 0f).
duration float The duration of the audio clip in seconds (default is negative infinity, meaning the full duration).

Return Value

Type Description
AudioClip The generated streaming AudioClip.