Skip to main content

isSilent

function isSilent(samples, threshold): boolean;

Simple silent detection to only check the first and last bit from the sample

Parameters

ParameterTypeDefault valueDescription
samplesAudioSamplesundefinedAudio sample data, this could be in a form of floating number of a byte number as long as the threshold value is given accordingly.
thresholdnumberSILENT_THRESHOLDSilent threshold

Returns

boolean

true when it is silent

Default Value

1.0 / 32767 assuming the sample is float value