/ HALion Developer Resource / HALion Script / Reference /

getSamplingRate

getSamplingRate()

Description

Function to retrieve the sample rate from the host software.

Available in: Processor.

Return Values

Returns the sample rate of the host software in Hertz (i.e., samples per seconds).

Example

-- Print the sample rate of the host software.

function onInit()
    fs = getSamplingRate()
    print(fs, "Hz")   
end