diff options
author | Johannes Mueller <github@johannes-mueller.org> | 2017-08-04 14:07:01 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-06-20 21:06:16 +0200 |
commit | ef978d1b350e4ccc7cb9b00a501a1793298482ed (patch) | |
tree | 2c5bad25bac31e8632c16dd1b10e3ac928192bfc /libs/plugins/a-comp.lv2/a-comp.c | |
parent | 87ea757a5de4b966ed2026f4ee9b04e6d80adcbb (diff) |
Inlevel output port to visualize the input level in the generic GUI
Diffstat (limited to 'libs/plugins/a-comp.lv2/a-comp.c')
-rw-r--r-- | libs/plugins/a-comp.lv2/a-comp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/plugins/a-comp.lv2/a-comp.c b/libs/plugins/a-comp.lv2/a-comp.c index f495e7f2a0..a104022c0d 100644 --- a/libs/plugins/a-comp.lv2/a-comp.c +++ b/libs/plugins/a-comp.lv2/a-comp.c @@ -48,6 +48,7 @@ typedef enum { ACOMP_GAINR, ACOMP_OUTLEVEL, + ACOMP_INLEVEL, ACOMP_SIDECHAIN, ACOMP_ENABLE, @@ -68,6 +69,7 @@ typedef struct { float* gainr; float* outlevel; + float* inlevel; float* sidechain; float* enable; @@ -161,6 +163,9 @@ connect_port(LV2_Handle instance, case ACOMP_OUTLEVEL: acomp->outlevel = (float*)data; break; + case ACOMP_INLEVEL: + acomp->inlevel = (float*)data; + break; case ACOMP_SIDECHAIN: acomp->sidechain = (float*)data; break; @@ -250,6 +255,7 @@ activate(LV2_Handle instance) *(acomp->gainr) = 0.0f; *(acomp->outlevel) = -70.0f; + *(acomp->inlevel) = -160.f; } static void @@ -373,6 +379,7 @@ run_mono(LV2_Handle instance, uint32_t n_samples) } *(acomp->outlevel) = (max < 0.0056f) ? -70.f : to_dB(max); + *(acomp->inlevel) = in_peak_db; acomp->makeup_gain = makeup_gain; #ifdef LV2_EXTENDED @@ -537,6 +544,7 @@ run_stereo(LV2_Handle instance, uint32_t n_samples) } *(acomp->outlevel) = (max < 0.0056f) ? -70.f : to_dB(max); + *(acomp->inlevel) = in_peak_db; acomp->makeup_gain = makeup_gain; #ifdef LV2_EXTENDED |