13
0

Added use click emphasis toggle (libs/ardour)

This commit is contained in:
Damien Zammit 2015-10-08 03:24:21 +11:00 committed by Robin Gareus
parent ce9b271a92
commit bcbb14f581
2 changed files with 5 additions and 2 deletions

View File

@ -148,6 +148,7 @@ CONFIG_VARIABLE (bool, clicking, "clicking", false)
CONFIG_VARIABLE (std::string, click_sound, "click-sound", "") CONFIG_VARIABLE (std::string, click_sound, "click-sound", "")
CONFIG_VARIABLE (std::string, click_emphasis_sound, "click-emphasis-sound", "") CONFIG_VARIABLE (std::string, click_emphasis_sound, "click-emphasis-sound", "")
CONFIG_VARIABLE (gain_t, click_gain, "click-gain", 1.0) CONFIG_VARIABLE (gain_t, click_gain, "click-gain", 1.0)
CONFIG_VARIABLE (bool, use_click_emphasis, "use-click-emphasis", true)
/* transport control and related */ /* transport control and related */

View File

@ -81,13 +81,15 @@ Session::click (framepos_t start, framecnt_t nframes)
for (TempoMap::BBTPointList::const_iterator i = points_begin; i != points_end; ++i) { for (TempoMap::BBTPointList::const_iterator i = points_begin; i != points_end; ++i) {
switch ((*i).beat) { switch ((*i).beat) {
case 1: case 1:
if (click_emphasis_data) { if (click_emphasis_data && Config->get_use_click_emphasis () == true) {
clicks.push_back (new Click ((*i).frame, click_emphasis_length, click_emphasis_data)); clicks.push_back (new Click ((*i).frame, click_emphasis_length, click_emphasis_data));
} else if (click_data && Config->get_use_click_emphasis () == false) {
clicks.push_back (new Click ((*i).frame, click_length, click_data));
} }
break; break;
default: default:
if (click_emphasis_data == 0 || (click_emphasis_data && (*i).beat != 1)) { if (click_emphasis_data == 0 || (Config->get_use_click_emphasis () == false) || (click_emphasis_data && (*i).beat != 1)) {
clicks.push_back (new Click ((*i).frame, click_length, click_data)); clicks.push_back (new Click ((*i).frame, click_length, click_data));
} }
break; break;