Fix crash on audio record (time converter segfault wackiness).
git-svn-id: svn://localhost/ardour2/branches/3.0@4607 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
87c7b62103
commit
3e1eb6bcbd
|
@ -56,14 +56,16 @@ using namespace PBD;
|
|||
using namespace Editing;
|
||||
using namespace Gnome; // for Canvas
|
||||
|
||||
static const Evoral::IdentityConverter<double, nframes_t> default_converter;
|
||||
|
||||
AutomationLine::AutomationLine (const string& name, TimeAxisView& tv, ArdourCanvas::Group& parent,
|
||||
boost::shared_ptr<AutomationList> al,
|
||||
const Evoral::TimeConverter<double, nframes_t>& converter)
|
||||
const Evoral::TimeConverter<double, nframes_t>* converter)
|
||||
: trackview (tv)
|
||||
, _name (name)
|
||||
, alist (al)
|
||||
, _parent_group (parent)
|
||||
, _time_converter (converter)
|
||||
, _time_converter (converter ? (*converter) : default_converter)
|
||||
{
|
||||
_interpolation = al->interpolation();
|
||||
points_visible = false;
|
||||
|
|
|
@ -56,7 +56,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
|
|||
public:
|
||||
AutomationLine (const string& name, TimeAxisView&, ArdourCanvas::Group&,
|
||||
boost::shared_ptr<ARDOUR::AutomationList>,
|
||||
const Evoral::TimeConverter<double, nframes_t>& converter);
|
||||
const Evoral::TimeConverter<double, nframes_t>* converter = 0);
|
||||
virtual ~AutomationLine ();
|
||||
|
||||
void queue_reset ();
|
||||
|
@ -128,7 +128,7 @@ class AutomationLine : public sigc::trackable, public PBD::StatefulThingWithGoin
|
|||
void set_colors();
|
||||
|
||||
void modify_point_y (ControlPoint&, double);
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
string _name;
|
||||
|
|
|
@ -71,7 +71,7 @@ AutomationRegionView::create_line (boost::shared_ptr<ARDOUR::AutomationList> lis
|
|||
_line = boost::shared_ptr<AutomationLine>(new AutomationLine(
|
||||
ARDOUR::EventTypeMap::instance().to_symbol(list->parameter()),
|
||||
trackview, *get_canvas_group(), list,
|
||||
_region->source(0)->time_converter()));
|
||||
&_region->source(0)->time_converter()));
|
||||
_line->set_colors();
|
||||
_line->set_interpolation(list->interpolation());
|
||||
_line->show();
|
||||
|
|
|
@ -211,14 +211,11 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session& s, boost::shared_ptr<Ro
|
|||
|
||||
/* no regions, just a single line for the entire track (e.g. bus gain) */
|
||||
} else {
|
||||
static const Evoral::IdentityConverter<double,nframes_t> null_converter;
|
||||
|
||||
boost::shared_ptr<AutomationLine> line(new AutomationLine (
|
||||
ARDOUR::EventTypeMap::instance().to_symbol(_control->parameter()),
|
||||
*this,
|
||||
*_canvas_display,
|
||||
_control->alist(),
|
||||
null_converter));
|
||||
_control->alist()));
|
||||
|
||||
line->set_line_color (ARDOUR_UI::config()->canvasvar_ProcessorAutomationLine.get());
|
||||
line->queue_reset ();
|
||||
|
|
|
@ -30,19 +30,16 @@
|
|||
|
||||
#include <ardour/session.h>
|
||||
|
||||
|
||||
#include "i18n.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace ARDOUR;
|
||||
using namespace PBD;
|
||||
|
||||
AudioRegionGainLine::AudioRegionGainLine (const string & name, Session& s, AudioRegionView& r, ArdourCanvas::Group& parent, boost::shared_ptr<AutomationList> l)
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, l,
|
||||
Evoral::IdentityConverter<double, nframes_t>()),
|
||||
session (s),
|
||||
rv (r)
|
||||
: AutomationLine (name, r.get_time_axis_view(), parent, l)
|
||||
, session (s)
|
||||
, rv (r)
|
||||
{
|
||||
// If this isn't true something is horribly wrong, and we'll get catastrophic gain values
|
||||
assert(l->parameter().type() == EnvelopeAutomation);
|
||||
|
|
Loading…
Reference in New Issue
Block a user