AudioLevelExtension extension

Extension on num to determine audio level descriptions.

This extension provides a method getAudioLevel on num instances to return a string representation of the audio level based on the numeric value. It utilizes the AudioLevel class constants to match the numeric value to a specific audio level description.

Returns: A string representing the audio level. It matches the numeric value to one of the predefined audio levels in the AudioLevel class, such as "audio_too_low", "audio_low", "audio_medium", "audio_high", or "audio_peak". If the numeric value does not match any case, it defaults to "audio_too_low".

on

Methods

getAudioLevel() String

Available on num, provided by the AudioLevelExtension extension

Returns the audio level description based on the numeric value.