Skip to content
Snippets Groups Projects
Commit ded7c220 authored by moon2's avatar moon2 :speech_balloon:
Browse files

mixer: move rms bar to align notch with -15dB

parent aad317f5
No related branches found
No related tags found
1 merge request!726Appfixes
...@@ -336,6 +336,8 @@ class AudioMixer(Responder): ...@@ -336,6 +336,8 @@ class AudioMixer(Responder):
ctx.rgb(0, 0, 0) ctx.rgb(0, 0, 0)
ctx.rectangle(chan_width / 2 - 13, bar_bottom - len_bar, 9, len_bar).fill() ctx.rectangle(chan_width / 2 - 13, bar_bottom - len_bar, 9, len_bar).fill()
# reference notch
ctx.move_to(chan_width / 2 - 13, bar_bottom - len_bar * 5 / 7) ctx.move_to(chan_width / 2 - 13, bar_bottom - len_bar * 5 / 7)
ctx.rel_line_to(-5, 0).stroke() ctx.rel_line_to(-5, 0).stroke()
...@@ -358,9 +360,9 @@ class AudioMixer(Responder): ...@@ -358,9 +360,9 @@ class AudioMixer(Responder):
ctx.rgb(0, 0, 0) ctx.rgb(0, 0, 0)
ctx.rectangle(chan_width / 2 - 9, bar_bottom - len_bar, 5, len_bar).fill() ctx.rectangle(chan_width / 2 - 9, bar_bottom - len_bar, 5, len_bar).fill()
# rms bar # rms bar
# hmmmh do we reuse the 0dB notch for normalization...? rms = chan.get_rms_dB() + 15
rms = chan.get_rms_dB() + 12
ctx.rgb(*colors.rms_bar) ctx.rgb(*colors.rms_bar)
rms_bar_len = (rms + 50) / 70 rms_bar_len = (rms + 50) / 70
rms_bar_len = min(1, max(0, rms_bar_len)) rms_bar_len = min(1, max(0, rms_bar_len))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment