From 157564947b1707fea0c31462a2b479cc67a6d554 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 12 Jul 2016 04:01:56 +0200 Subject: [PATCH] a-eq tweaks: * shorten e-eq Hz display (no decimals) * use 16:9 aspect inline display * fix a compiler warning --- libs/plugins/a-eq.lv2/a-eq.c | 5 ++--- libs/plugins/a-eq.lv2/a-eq.ttl.in | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/libs/plugins/a-eq.lv2/a-eq.c b/libs/plugins/a-eq.lv2/a-eq.c index 21a69c0671..30265d7955 100644 --- a/libs/plugins/a-eq.lv2/a-eq.c +++ b/libs/plugins/a-eq.lv2/a-eq.c @@ -128,7 +128,6 @@ instantiate(const LV2_Descriptor* descriptor, const char* bundle_path, const LV2_Feature* const* features) { - int i; Aeq* aeq = (Aeq*)malloc(sizeof(Aeq)); aeq->srate = rate; @@ -140,7 +139,7 @@ instantiate(const LV2_Descriptor* descriptor, } #endif - for (i = 0; i < BANDS; i++) + for (int i = 0; i < BANDS; i++) linear_svf_reset(&aeq->v_filter[i]); aeq->need_expose = true; @@ -547,7 +546,7 @@ static LV2_Inline_Display_Image_Surface * render_inline (LV2_Handle instance, uint32_t w, uint32_t max_h) { Aeq* self = (Aeq*)instance; - uint32_t h = MIN (w, max_h); + uint32_t h = MIN (w * 9 / 16, max_h); if (!self->display || self->w != w || self->h != h) { if (self->display) cairo_surface_destroy(self->display); diff --git a/libs/plugins/a-eq.lv2/a-eq.ttl.in b/libs/plugins/a-eq.lv2/a-eq.ttl.in index b751a96c90..27325560f2 100644 --- a/libs/plugins/a-eq.lv2/a-eq.ttl.in +++ b/libs/plugins/a-eq.lv2/a-eq.ttl.in @@ -11,6 +11,16 @@ foaf:name "Ardour Team" ; foaf:homepage . +unit:hz0 + a unit:Unit ; + rdfs:label "hertz" ; + unit:prefixConversion [ + unit:factor 0.001 ; + unit:to units:khz + ] ; + unit:render "%.0f Hz" ; + unit:symbol "Hz" . + a lv2:Plugin, doap:Project, lv2:FilterPlugin ; @@ -37,7 +47,7 @@ lv2:default 160.000000 ; lv2:minimum 20.000000 ; lv2:maximum 20000.000000 ; - unit:unit unit:hz ; + unit:unit unit:hz0 ; lv2:portProperty ; ], [ @@ -58,7 +68,7 @@ lv2:default 300.000000 ; lv2:minimum 20.000000 ; lv2:maximum 20000.000000 ; - unit:unit unit:hz ; + unit:unit unit:hz0 ; lv2:portProperty ; ], [ @@ -88,7 +98,7 @@ lv2:default 1000.000000 ; lv2:minimum 20.000000 ; lv2:maximum 20000.000000 ; - unit:unit unit:hz ; + unit:unit unit:hz0 ; lv2:portProperty ; ], [ @@ -118,7 +128,7 @@ lv2:default 2500.000000 ; lv2:minimum 20.000000 ; lv2:maximum 20000.000000 ; - unit:unit unit:hz ; + unit:unit unit:hz0 ; lv2:portProperty ; ], [ @@ -148,7 +158,7 @@ lv2:default 6000.000000 ; lv2:minimum 20.000000 ; lv2:maximum 20000.000000 ; - unit:unit unit:hz ; + unit:unit unit:hz0 ; lv2:portProperty ; ], [ @@ -188,7 +198,7 @@ lv2:default 9000.000000 ; lv2:minimum 20.000000 ; lv2:maximum 20000.000000 ; - unit:unit unit:hz ; + unit:unit unit:hz0 ; lv2:portProperty ; ], [