summaryrefslogtreecommitdiffstats
path: root/audio/ardour/tempoline_crash.patch
diff options
context:
space:
mode:
author Heinz Wiesinger <pprkut@slackbuilds.org>2013-11-10 12:26:45 +0100
committer Robby Workman <rworkman@slackbuilds.org>2013-11-11 10:51:51 -0600
commite5c306a01d3e55c19a5dd62b401377e62b116273 (patch)
tree2fb10e5427873ccc5e0702ca55243e370488924f /audio/ardour/tempoline_crash.patch
parent970a3bf043c2cbad64b5760a96d740bc1bdece65 (diff)
downloadslackbuilds-e5c306a01d3e55c19a5dd62b401377e62b116273.tar.gz
slackbuilds-e5c306a01d3e55c19a5dd62b401377e62b116273.tar.xz
audio/ardour: Updated for version 2.8.16.
Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'audio/ardour/tempoline_crash.patch')
-rw-r--r--audio/ardour/tempoline_crash.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/audio/ardour/tempoline_crash.patch b/audio/ardour/tempoline_crash.patch
new file mode 100644
index 0000000000..cd93b1531b
--- /dev/null
+++ b/audio/ardour/tempoline_crash.patch
@@ -0,0 +1,83 @@
+commit b29f54fb6efcdb2facf0471bd8e24d8eea3231b0
+Author: Paul Davis <paul@linuxaudiosystems.com>
+Date: Wed Feb 20 18:53:30 2013 +0000
+
+ back-port tempo line assert fix from 3.0 to stop crashing under some relatively easy to hit conditions
+
+ git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@14067 d708f5d6-7413-0410-9779-e7cbd77b26cf
+
+diff --git a/gtk2_ardour/tempo_lines.cc b/gtk2_ardour/tempo_lines.cc
+index e8bd034..a373dec 100644
+--- a/gtk2_ardour/tempo_lines.cc
++++ b/gtk2_ardour/tempo_lines.cc
+@@ -146,9 +146,8 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
+ }
+
+ xpos = rint(((nframes64_t)(*i).frame) / (double)frames_per_unit);
+- if (inserted_last_time && !_lines.empty()) {
+- li = _lines.lower_bound(xpos); // first line >= xpos
+- }
++
++ li = _lines.lower_bound(xpos); // first line >= xpos
+
+ line = (li != _lines.end()) ? li->second : NULL;
+ assert(!line || line->property_x1() == li->first);
+@@ -215,33 +214,35 @@ TempoLines::draw (ARDOUR::TempoMap::BBTPointList& points, double frames_per_unit
+ // Create a new line
+ } else if (_lines.size() < needed || _lines.size() < MAX_CACHED_LINES) {
+ //cout << "*** CREATING LINE" << endl;
+- assert(_lines.find(xpos) == _lines.end());
+- line = new ArdourCanvas::SimpleLine (*_group);
+- line->property_x1() = xpos;
+- line->property_x2() = xpos;
+- line->property_y1() = 0.0;
+- line->property_y2() = _height;
+- line->property_color_rgba() = color;
+- _lines.insert(make_pair(xpos, line));
+- inserted_last_time = true;
++ if (_lines.find(xpos) == _lines.end()) {
++ line = new ArdourCanvas::SimpleLine (*_group);
++ line->property_x1() = xpos;
++ line->property_x2() = xpos;
++ line->property_y1() = 0.0;
++ line->property_y2() = _height;
++ line->property_color_rgba() = color;
++ _lines.insert(make_pair(xpos, line));
++ inserted_last_time = true;
++ }
+
+ // Steal from the left
+ } else {
+ //cout << "*** STEALING FROM LEFT" << endl;
+- assert(_lines.find(xpos) == _lines.end());
+- Lines::iterator steal = _lines.begin();
+- line = steal->second;
+- _lines.erase(steal);
+- line->property_color_rgba() = color;
+- line->property_x1() = xpos;
+- line->property_x2() = xpos;
+- _lines.insert(make_pair(xpos, line));
+- inserted_last_time = true; // search next time
+- invalidated = true;
+-
+- // Shift clean range right
+- _clean_left = max(_clean_left, steal->first);
+- _clean_right = max(_clean_right, xpos);
++ if (_lines.find(xpos) == _lines.end()) {
++ Lines::iterator steal = _lines.begin();
++ line = steal->second;
++ _lines.erase(steal);
++ line->property_color_rgba() = color;
++ line->property_x1() = xpos;
++ line->property_x2() = xpos;
++ _lines.insert(make_pair(xpos, line));
++ inserted_last_time = true; // search next time
++ invalidated = true;
++
++ // Shift clean range right
++ _clean_left = max(_clean_left, steal->first);
++ _clean_right = max(_clean_right, xpos);
++ }
+ }
+
+ break;