[SCM] calf/master: Some fixed for multiband limiter graph redraw-prevention.

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:41:14 UTC 2013


The following commit has been merged in the master branch:
commit 733def1f4c14208f77a1a3b70f7ba3b2fddafa2c
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Fri Sep 21 19:17:38 2012 +0100

    Some fixed for multiband limiter graph redraw-prevention.

diff --git a/src/calf/modules_limit.h b/src/calf/modules_limit.h
index dc65c9f..0bc7c77 100644
--- a/src/calf/modules_limit.h
+++ b/src/calf/modules_limit.h
@@ -80,6 +80,7 @@ private:
     bool asc_old;
     float attack_old;
     bool _sanitize;
+    bool old_bypass;
     mutable volatile int last_generation;
     mutable bool redraw_graph;
 public:
@@ -93,7 +94,7 @@ public:
     void set_sample_rate(uint32_t sr);
     bool get_graph(int index, int subindex, float *data, int points, cairo_iface *context, int *mode) const;
     bool get_gridline(int index, int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const;
-    int  get_changed_offsets(int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
+    int  get_changed_offsets(int index, int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const;
 };
 
 };
diff --git a/src/modules_limit.cpp b/src/modules_limit.cpp
index 2a6d57e..3feb606 100644
--- a/src/modules_limit.cpp
+++ b/src/modules_limit.cpp
@@ -354,6 +354,11 @@ void multibandlimiter_audio_module::params_changed()
         q_old[2]    = *params[param_q2];
         redraw_graph = true;
     }
+    if ((*params[param_bypass] > 0.5) != old_bypass)
+    {
+        redraw_graph = true;
+        old_bypass = *params[param_bypass] > 0.5;
+    }
     // set the params of all strips
     float rel;
 
@@ -693,7 +698,7 @@ bool multibandlimiter_audio_module::get_gridline(int index, int subindex, float
     }
 }
 
-int multibandlimiter_audio_module::get_changed_offsets(int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const
+int multibandlimiter_audio_module::get_changed_offsets(int index, int generation, int &subindex_graph, int &subindex_dot, int &subindex_gridline) const
 {
     subindex_graph = 0;
     subindex_dot = 0;
@@ -704,5 +709,11 @@ int multibandlimiter_audio_module::get_changed_offsets(int generation, int &subi
         redraw_graph = false;
         last_generation++;
     }
+    else
+    {
+        subindex_graph = INT_MAX;
+        subindex_dot = INT_MAX;
+        subindex_gridline = INT_MAX;
+    }
     return last_generation;
 }

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list