Skip to main content

isMono

function isMono(channels, threshold): boolean;

Check if provided channels are mono or stereo

Parameters​

ParameterTypeDefault valueDescription
channelsAudioSamples[]undefinedAudio channels and assuming the inputs are in floating point form
thresholdnumberMONO_THRESHOLDMono detection threshold, default to floating point form

Returns​

boolean

true if they are mono, otherwise stereo

Default Value​

1.0 / 32767