[SCM] calf/master: + Compressor: use proper measurement for dot position (Thor's proposed fix)
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:38:28 UTC 2013
The following commit has been merged in the master branch:
commit caa65cff34d0977d5d44595c55b5174ae8099e1e
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Thu Nov 13 23:41:23 2008 +0000
+ Compressor: use proper measurement for dot position (Thor's proposed fix)
diff --git a/src/calf/modules_dev.h b/src/calf/modules_dev.h
index f9a08a2..6e90ec3 100644
--- a/src/calf/modules_dev.h
+++ b/src/calf/modules_dev.h
@@ -29,7 +29,7 @@ namespace calf_plugins {
class compressor_audio_module: public audio_module<compressor_metadata>, public line_graph_iface {
private:
- float linslope, clip, peak;
+ float linslope, clip, peak, detected;
bool aweighting;
aweighter awL, awR;
public:
@@ -92,6 +92,7 @@ public:
if(rms) absample *= absample;
linslope += (absample - linslope) * (absample > linslope ? attack_coeff : release_coeff);
float slope = rms ? sqrt(linslope) : linslope;
+ detected = slope;
if(slope > 0.f && (slope > threshold || knee < 1.f)) {
if(IS_FAKE_INFINITY(ratio)) {
@@ -190,8 +191,8 @@ public:
virtual bool get_dot(int index, int subindex, float &x, float &y, int &size, cairo_t *context) {
if (!subindex)
{
- x = 1 + 2 * log(peak) / log(65536);
- y = 1 + 2 * log(output_level(peak)) / log(65536);
+ x = 1 + 2 * log(detected) / log(65536);
+ y = 1 + 2 * log(output_level(detected)) / log(65536);
return true;
}
return false;
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list