diff options
author | Johannes Mueller <github@johannes-mueller.org> | 2017-08-07 13:26:47 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-06-20 21:06:16 +0200 |
commit | 6da18b32b53da240b808025a2fe938a9cddaf3ba (patch) | |
tree | 133b929e59257e158d30f5c9b6eea7b68ed48f74 /libs/plugins/a-comp.lv2 | |
parent | 619ba94f51d733c63af60838d7f10056d7482d4c (diff) |
Visualize the peak of the compressor state in a-comp
Diffstat (limited to 'libs/plugins/a-comp.lv2')
-rw-r--r-- | libs/plugins/a-comp.lv2/a-comp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/plugins/a-comp.lv2/a-comp.c b/libs/plugins/a-comp.lv2/a-comp.c index 5caec6d659..1de5954e89 100644 --- a/libs/plugins/a-comp.lv2/a-comp.c +++ b/libs/plugins/a-comp.lv2/a-comp.c @@ -877,15 +877,6 @@ render_inline_only_bars (cairo_t* cr, const AComp* self) cairo_set_line_width (cr, 2.0); - // visualize in peak - if (self->v_peakdb > -60.f) { - cairo_set_source_rgba (cr, 0.0, 1.0, 0.0, 1.0); - const float pk = (self->v_peakdb > 10.f) ? x1+wd : wd * (60.f+self->v_peakdb) / 70.f; - cairo_move_to (cr, pk, y1); - cairo_line_to (cr, pk, y1+ht); - cairo_stroke (cr); - } - // visualize threshold const float tr = x1 + wd * (60.f+self->v_thresdb) / 70.f; cairo_set_source_rgba (cr, 0.95, 0.95, 0.0, 1.0); @@ -900,6 +891,15 @@ render_inline_only_bars (cairo_t* cr, const AComp* self) cairo_move_to (cr, rt, y1); cairo_line_to (cr, rt, y1+ht); cairo_stroke (cr); + + // visualize in peak + if (self->v_peakdb > -60.f) { + cairo_set_source_rgba (cr, 0.0, 1.0, 0.0, 1.0); + const float pk = (self->v_peakdb > 10.f) ? x1+wd : wd * (60.f+self->v_peakdb) / 70.f; + cairo_move_to (cr, pk, y1); + cairo_line_to (cr, pk, y1+ht); + cairo_stroke (cr); + } } static LV2_Inline_Display_Image_Surface * |