mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
updated dBFS from mean to max value
This commit is contained in:
parent
08de279787
commit
93f90f2345
1 changed files with 2 additions and 2 deletions
|
@ -887,8 +887,8 @@ class RF:
|
||||||
# calculate RMS and then dBFS
|
# calculate RMS and then dBFS
|
||||||
# TODO: Need to change static.AUDIO_RMS to AUDIO_DBFS somewhen
|
# TODO: Need to change static.AUDIO_RMS to AUDIO_DBFS somewhen
|
||||||
# https://dsp.stackexchange.com/questions/8785/how-to-compute-dbfs
|
# https://dsp.stackexchange.com/questions/8785/how-to-compute-dbfs
|
||||||
rms = int(np.sqrt(np.mean(d ** 2)))
|
rms = int(np.sqrt(np.max(d ** 2)))
|
||||||
static.AUDIO_DBFS = 20 * np.log10(rms * np.sqrt(2) / 32768)
|
static.AUDIO_DBFS = 20 * np.log10(rms / 32768)
|
||||||
|
|
||||||
rms_counter = 0
|
rms_counter = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue