Skip to main content

AudioClip.Create(string name, number lengthSamples, number channels, number frequency)

Creates a user AudioClip with a name and with the given length in samples, channels and frequency.

Parameters:

NameTypeDescription
namestringName of clip.
lengthSamplesnumberNumber of sample frames.
channelsnumberNumber of channels per frame.
frequencynumberSample frequency of clip.

Returns:

typeDescription
AudioClipAudioClip A reference to the created AudioClip.

Usage

---@type string
local name;

---@type number
local lengthSamples;

---@type number
local channels;

---@type number
local frequency;


local val0 = AudioClip:Create(name, lengthSamples, channels, frequency)