function dbfs_float
dbfs_float(frame_array)

Calculate dBFS from float array

Note: It supports -1.0 ~ 1.0 amplitude array. Out of this range will be thrown error.

Parameters

frame_array

Audio PCM frame array

Return Type

Throws

TypeError

If frame_array is not Float32Array or Float64Array

RangeError

If frame_array is empty array

RangeError

If frame_array has over 1.0 or under -1.0 elements

Usage

import { dbfs_float } from "static/util/dbfs.js";