Skip to main content

VideoPlayer.GetAudioSampleRate(number trackIndex)

Gets the audio track sampling rate in Hertz.

Parameters:

NameTypeDescription
trackIndexnumberIndex of the audio track to query.

Returns:

typeDescription
numberThe sampling rate in Hertz.

Usage

---@type VideoPlayer
local videoplayer;

---@type number
local trackIndex;


local val0 = videoplayer.GetAudioSampleRate(trackIndex)

Extra Detail

For URL sources, this will only be set once the source preparation is completed. See VideoPlayer.Prepare.