summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-06-07 18:35:37 +0200
committerRobin Gareus <robin@gareus.org>2014-06-07 18:35:37 +0200
commit5a41487a082292c8a2c49e253ce9b5d86f2caf9b (patch)
tree40165baf2bb69aacc9e4c5fc8d5fb2abfa47b410 /gtk2_ardour
parent94fa9278614557effadb5fea8a2387ea29d1cdb6 (diff)
remove some 1920 tick constants and leave notes for some others.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/automation_line.cc6
-rw-r--r--gtk2_ardour/quantize_dialog.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/gtk2_ardour/automation_line.cc b/gtk2_ardour/automation_line.cc
index b0cc6eeea3..670083e0d4 100644
--- a/gtk2_ardour/automation_line.cc
+++ b/gtk2_ardour/automation_line.cc
@@ -537,7 +537,8 @@ AutomationLine::ContiguousControlPoints::compute_x_bounds (PublicEditor& e)
const framepos_t pos = e.pixel_to_sample(before_x);
const Meter& meter = map.meter_at (pos);
- const framecnt_t len = ceil(meter.frames_per_bar (map.tempo_at (pos), e.session()->frame_rate()) / 1920.0 / meter.divisions_per_bar());
+ const framecnt_t len = ceil (meter.frames_per_bar (map.tempo_at (pos), e.session()->frame_rate())
+ / (Timecode::BBT_Time::ticks_per_beat * meter.divisions_per_bar()) );
const double one_tick_in_pixels = e.sample_to_pixel_unrounded (len);
before_x += one_tick_in_pixels;
@@ -552,7 +553,8 @@ AutomationLine::ContiguousControlPoints::compute_x_bounds (PublicEditor& e)
const framepos_t pos = e.pixel_to_sample(after_x);
const Meter& meter = map.meter_at (pos);
- const framecnt_t len = ceil(meter.frames_per_bar (map.tempo_at (pos), e.session()->frame_rate()) / 1920.0 / meter.divisions_per_bar());
+ const framecnt_t len = ceil (meter.frames_per_bar (map.tempo_at (pos), e.session()->frame_rate())
+ / (Timecode::BBT_Time::ticks_per_beat * meter.divisions_per_bar()));
const double one_tick_in_pixels = e.sample_to_pixel_unrounded (len);
after_x -= one_tick_in_pixels;
diff --git a/gtk2_ardour/quantize_dialog.cc b/gtk2_ardour/quantize_dialog.cc
index 623a5d8033..98514326d5 100644
--- a/gtk2_ardour/quantize_dialog.cc
+++ b/gtk2_ardour/quantize_dialog.cc
@@ -57,7 +57,7 @@ QuantizeDialog::QuantizeDialog (PublicEditor& e)
, swing_adjustment (100.0, -130.0, 130.0, 1.0, 10.0)
, swing_spinner (swing_adjustment)
, swing_button (_("Swing"))
- , threshold_adjustment (0.0, -1920.0, 1920.0, 1.0, 10.0) // XXX MAGIC TICK NUMBER FIX ME
+ , threshold_adjustment (0.0, -Timecode::BBT_Time::ticks_per_beat, Timecode::BBT_Time::ticks_per_beat, 1.0, 10.0)
, threshold_spinner (threshold_adjustment)
, threshold_label (_("Threshold (ticks)"))
, snap_start_button (_("Snap note start"))