[SCM] calf/master: + Compressor: do not display frequency grid lines/legend in the graph
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:38:57 UTC 2013
The following commit has been merged in the master branch:
commit f8d544d59a978bb7e329f6417383c2038816a5a1
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Thu Jan 22 01:34:48 2009 +0000
+ Compressor: do not display frequency grid lines/legend in the graph
diff --git a/src/modules_dsp.cpp b/src/modules_dsp.cpp
index eec0056..2ba618b 100644
--- a/src/modules_dsp.cpp
+++ b/src/modules_dsp.cpp
@@ -64,31 +64,34 @@ static void set_channel_color(cairo_iface *context, int channel)
context->set_line_width(1.5);
}
-static bool get_freq_gridline(int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context)
+static bool get_freq_gridline(int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context, bool use_frequencies = true)
{
- if (subindex < 28)
+ if (use_frequencies)
{
- vertical = true;
- if (subindex == 9) legend = "100 Hz";
- if (subindex == 18) legend = "1 kHz";
- if (subindex == 27) legend = "10 kHz";
- float freq = 100;
- if (subindex < 9)
- freq = 10 * (subindex + 1);
- else if (subindex < 18)
- freq = 100 * (subindex - 9 + 1);
- else if (subindex < 27)
- freq = 1000 * (subindex - 18 + 1);
- else
- freq = 10000 * (subindex - 27 + 1);
- pos = log(freq / 20.0) / log(1000);
- if (!legend.empty())
- context->set_source_rgba(0.25, 0.25, 0.25, 0.75);
- else
- context->set_source_rgba(0.25, 0.25, 0.25, 0.5);
- return true;
+ if (subindex < 28)
+ {
+ vertical = true;
+ if (subindex == 9) legend = "100 Hz";
+ if (subindex == 18) legend = "1 kHz";
+ if (subindex == 27) legend = "10 kHz";
+ float freq = 100;
+ if (subindex < 9)
+ freq = 10 * (subindex + 1);
+ else if (subindex < 18)
+ freq = 100 * (subindex - 9 + 1);
+ else if (subindex < 27)
+ freq = 1000 * (subindex - 18 + 1);
+ else
+ freq = 10000 * (subindex - 27 + 1);
+ pos = log(freq / 20.0) / log(1000);
+ if (!legend.empty())
+ context->set_source_rgba(0.25, 0.25, 0.25, 0.75);
+ else
+ context->set_source_rgba(0.25, 0.25, 0.25, 0.5);
+ return true;
+ }
+ subindex -= 28;
}
- subindex -= 28;
float gain = 16.0 / (1 << subindex);
pos = dB_grid(gain);
if (pos < -1)
@@ -437,7 +440,7 @@ bool compressor_audio_module::get_gridline(int index, int subindex, float &pos,
{
bool tmp;
vertical = (subindex & 1) != 0;
- bool result = get_freq_gridline(subindex >> 1, pos, tmp, legend, context);
+ bool result = get_freq_gridline(subindex >> 1, pos, tmp, legend, context, false);
if (result && vertical) {
if ((subindex & 4) && !legend.empty()) {
legend = "";
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list