[SCM] calf/master: Merge branch 'line-graph' of boomshop.net:calf into line-graph
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:41:00 UTC 2013
line-graph renewable from plugin
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: d6a3c1a63a147948535a50da009275278ad5e6a3
X-Git-Newrev: 34569260c452f0fa4c543155ebba174a42a343dc
The following commit has been merged in the master branch:
commit 598be7f7ff0cc616a5aeb7d7a41bf384183bda7f
Merge: 8c9b3393c09dce259a96dddc19be0d465568f70e a9983d601e301b96bed632f3b59ed85c84aeeecf
Author: Christian Holschuh <chrisch.holli at gmx.de>
Date: Tue Mar 6 08:13:31 2012 +0100
Merge branch 'line-graph' of boomshop.net:calf into line-graph
diff --combined src/modules.cpp
index a2e13aa,00f500e..0170bee
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@@ -859,6 -859,7 +859,7 @@@ analyzer_audio_module::analyzer_audio_m
meter_R = 0.f;
_accuracy = -1;
_acc_old = -1;
+ _mode_old = -1;
ppos = 0;
plength = 0;
fpos = 0;
@@@ -1001,7 -1002,6 +1002,7 @@@ bool analyzer_audio_module::get_graph(i
double freq;
int iter = 0;
int _iter = 1;
+ float posneg = 1;
int _param_speed = 16 - (int)*params[param_analyzer_speed];
if(subindex == 0) {
if(!((int)____analyzer_phase_was_drawn_here % _param_speed)) {
@@@ -1050,7 -1050,7 +1051,7 @@@
// fill smoothing & falling buffer
if(*params[param_analyzer_smoothing] == 1.f)
- fft_smooth[i] = fabs(fft_out[i]);
+ fft_smooth[i] = fft_out[i];
if(*params[param_analyzer_smoothing] == 0.f and fft_smooth[i] < fabs(fft_out[i])) {
fft_smooth[i] = fabs(fft_out[i]);
}
@@@ -1064,7 -1064,7 +1065,7 @@@
if(____analyzer_hold_dirty) {
fft_hold[i] = 0.f;
} else if(fabs(fft_out[i]) > fft_hold[i]) {
- fft_hold[i] = fabs(fft_out[i]);
+ fft_hold[i] = fft_out[i];
}
}
// run fft
@@@ -1145,8 -1145,8 +1146,8 @@@
}
float diff_fft;
diff_fft = fabs(fft_outL[_iter]) - fabs(fft_outR[_iter]);
+ posneg = fabs(diff_fft) / diff_fft;
fft_out[_iter] = diff_fft / _accuracy;
- //printf("fft_out[_iter]: %.4f\n",fft_out[_iter]);
break;
}
}
@@@ -1163,7 -1163,7 +1164,7 @@@
switch((int)*params[param_analyzer_smoothing]) {
case 0:
// falling
- fft_smooth[iter] += fft_delta[iter];
+ fft_smooth[iter] -= fabs(fft_delta[iter]);
fft_delta[iter] /= 1.01f;
val = fft_smooth[iter];
break;
@@@ -1171,7 -1171,7 +1172,7 @@@
// smoothing
if(____analyzer_smooth_dirty) {
// rebuild delta values
- fft_delta[iter] = (fabs(fft_out[iter]) - fft_smooth[iter]) / _param_speed;
+ fft_delta[iter] = (posneg * fabs(fft_out[iter]) - fft_smooth[iter]) / _param_speed;
}
fft_smooth[iter] += fft_delta[iter];
val = fft_smooth[iter];
@@@ -1187,7 -1187,7 +1188,7 @@@
data[i] = dB_grid(fabs(val) / _accuracy * 2.f + 1e-20);
if(*params[param_analyzer_mode] == 3) {
if(i) {
- data[i] = fft_out[iter];
+ data[i] = val;
}
else data[i] = 0.f;
}
@@@ -1225,3 -1225,27 +1226,27 @@@
return true;
}
+ bool analyzer_audio_module::get_gridline(int index, int subindex, float &pos, bool &vertical, std::string &legend, cairo_iface *context) const
+ {
+ bool out;
+ if(*params[param_analyzer_mode] != 3)
+ out = get_freq_gridline(subindex, pos, vertical, legend, context);
+ else
+ out = get_freq_gridline(subindex, pos, vertical, legend, context, true, 16, 0.0000000001f);
+ if(*params[param_analyzer_mode] == 3 and not vertical) {
+ if(subindex == 30)
+ legend="L";
+ else if(subindex == 34)
+ legend="R";
+ else
+ legend = "";
+ }
+ return out;
+ }
+ bool analyzer_audio_module::get_clear_all(int index) const {
+ if(*params[param_analyzer_mode] != _mode_old) {
+ _mode_old = *params[param_analyzer_mode];
+ return true;
+ }
+ return false;
+ }
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list