summaryrefslogtreecommitdiff
path: root/libs/plugins
diff options
context:
space:
mode:
authorJohannes Mueller <github@johannes-mueller.org>2019-04-15 15:33:44 +0200
committerJohannes Mueller <github@johannes-mueller.org>2019-04-15 18:40:27 +0200
commitca05f03e72c1e6f4ea5fe8aa63365b8fd6ff9b9d (patch)
treeaf6aa4d72792316ff1a7c408844a52a552a04d82 /libs/plugins
parentbeaaa80d42126122d07b87766f7eff1ee16c1044 (diff)
Align port layout and code of a-exp with the one of a-comp
Diffstat (limited to 'libs/plugins')
-rw-r--r--libs/plugins/a-comp.lv2/a-comp.c1
-rw-r--r--libs/plugins/a-exp.lv2/a-exp.c8
-rw-r--r--libs/plugins/a-exp.lv2/a-exp.ttl.in21
3 files changed, 18 insertions, 12 deletions
diff --git a/libs/plugins/a-comp.lv2/a-comp.c b/libs/plugins/a-comp.lv2/a-comp.c
index b256f25df1..3b7c21fcc1 100644
--- a/libs/plugins/a-comp.lv2/a-comp.c
+++ b/libs/plugins/a-comp.lv2/a-comp.c
@@ -361,6 +361,7 @@ run(LV2_Handle instance, uint32_t n_samples)
Lyg = 0.f;
Lxg = (ingain==0.f) ? -160.f : to_dB(ingain);
Lxg = sanitize_denormal(Lxg);
+
if (Lxg > in_peak_db) {
in_peak_db = Lxg;
}
diff --git a/libs/plugins/a-exp.lv2/a-exp.c b/libs/plugins/a-exp.lv2/a-exp.c
index 9eca7b5d2f..96ad0767f9 100644
--- a/libs/plugins/a-exp.lv2/a-exp.c
+++ b/libs/plugins/a-exp.lv2/a-exp.c
@@ -27,11 +27,11 @@
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
-#define RESET_PEAK_AFTER_SECONDS 3
-
#define AEXP_URI "urn:ardour:a-exp"
#define AEXP_STEREO_URI "urn:ardour:a-exp#stereo"
+#define RESET_PEAK_AFTER_SECONDS 3
+
#ifndef M_PI
# define M_PI 3.14159265358979323846
#endif
@@ -57,8 +57,8 @@ typedef enum {
AEXP_MAKEUP,
AEXP_GAINR,
- AEXP_OUTLEVEL,
AEXP_INLEVEL,
+ AEXP_OUTLEVEL,
AEXP_SIDECHAIN,
AEXP_ENABLE,
@@ -287,7 +287,6 @@ activate(LV2_Handle instance)
#endif
}
-
static void
run(LV2_Handle instance, uint32_t n_samples)
{
@@ -363,7 +362,6 @@ run(LV2_Handle instance, uint32_t n_samples)
#endif
float in_peak_db = -160.f;
- old_gainr = *aexp->gainr;
float max_gainr = 0.0;
for (i = 0; i < n_samples; i++) {
diff --git a/libs/plugins/a-exp.lv2/a-exp.ttl.in b/libs/plugins/a-exp.lv2/a-exp.ttl.in
index 2ab3860eff..154a1cb9ea 100644
--- a/libs/plugins/a-exp.lv2/a-exp.ttl.in
+++ b/libs/plugins/a-exp.lv2/a-exp.ttl.in
@@ -10,6 +10,13 @@
foaf:name "Ardour Team" ;
foaf:homepage <http://ardour.org/> .
+unit:db-display
+ a unit:Unit ;
+ rdfs:label "decibels" ;
+ rdfs:label "dB" ;
+ unit:render "%4.1f" ;
+ unit:symbol "dB" .
+
<urn:ardour:a-exp>
a lv2:Plugin, doap:Project, lv2:ExpanderPlugin ;
@@ -90,27 +97,27 @@
lv2:default 0.000000 ;
lv2:minimum 0.000000 ;
lv2:maximum 45.000000 ;
- unit:unit unit:db ;
+ unit:unit unit:db-display ;
] ,
[
a lv2:OutputPort, lv2:ControlPort ;
lv2:index 7 ;
- lv2:name "Output Level" ;
- lv2:symbol "outlevel" ;
+ lv2:name "Input Level" ;
+ lv2:symbol "inlevel" ;
lv2:default -45.000000 ;
lv2:minimum -45.000000 ;
lv2:maximum 0.000000 ;
- unit:unit unit:db ;
+ unit:unit unit:db-display ;
] ,
[
a lv2:OutputPort, lv2:ControlPort ;
lv2:index 8 ;
- lv2:name "Input Level" ;
- lv2:symbol "inlevel" ;
+ lv2:name "Output Level" ;
+ lv2:symbol "outlevel" ;
lv2:default -45.000000 ;
lv2:minimum -45.000000 ;
lv2:maximum 0.000000 ;
- unit:unit unit:db ;
+ unit:unit unit:db-display ;
] ,
[
a lv2:InputPort, lv2:ControlPort ;