AudioService

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

ShotInstanceservicenot creatablecomingAudio

Up and coming

Load sounds as samples you can read, cut and save.

LoadAsync reads WAV (8, 16, 24 and 32-bit PCM, float and extensible) directly, and OGG and MP3 through ffmpeg, into an AudioClip at the file's own rate and channel count. CreateClip makes a silent one.

A service: write use AudioService.

Passes shot check todayLuau
local function example(x : AudioService)
	local clip = x:CreateClip(48000, 2, 4800)
	print(clip.TimeLength)
end

Methods

NameArgumentsReturnsDescription
LoadAsync
yields
(source: string | buffer)(AudioClip?, string?)Loads WAV (8, 16, 24 and 32-bit PCM, float, extensible) directly, and OGG and MP3 through ffmpeg.
CreateClip(sampleRate: number, channels: number, sampleCount: number)AudioClipA silent clip with that sample rate, channel count and number of samples.
From ShotInstance 33