mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 11:46:25 +01:00
Fix uninitialised tempo section variable
Should fix 7390.
This commit is contained in:
parent
b57b1de491
commit
7a71428fb0
2 changed files with 10 additions and 10 deletions
|
|
@ -249,7 +249,6 @@ class LIBARDOUR_API TempoSection : public MetricSection, public Tempo {
|
||||||
framepos_t frame_at_pulse (const double& pulse) const;
|
framepos_t frame_at_pulse (const double& pulse) const;
|
||||||
|
|
||||||
Timecode::BBT_Time legacy_bbt () { return _legacy_bbt; }
|
Timecode::BBT_Time legacy_bbt () { return _legacy_bbt; }
|
||||||
bool legacy_end () { return _legacy_end; }
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
@ -283,7 +282,6 @@ class LIBARDOUR_API TempoSection : public MetricSection, public Tempo {
|
||||||
bool _locked_to_meter;
|
bool _locked_to_meter;
|
||||||
bool _clamped;
|
bool _clamped;
|
||||||
Timecode::BBT_Time _legacy_bbt;
|
Timecode::BBT_Time _legacy_bbt;
|
||||||
bool _legacy_end;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list<MetricSection*> Metrics;
|
typedef std::list<MetricSection*> Metrics;
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,6 @@ TempoSection::TempoSection (const XMLNode& node, framecnt_t sample_rate)
|
||||||
, _active (true)
|
, _active (true)
|
||||||
, _locked_to_meter (false)
|
, _locked_to_meter (false)
|
||||||
, _clamped (false)
|
, _clamped (false)
|
||||||
, _legacy_end (false)
|
|
||||||
{
|
{
|
||||||
LocaleGuard lg;
|
LocaleGuard lg;
|
||||||
|
|
||||||
|
|
@ -201,19 +200,22 @@ TempoSection::TempoSection (const XMLNode& node, framecnt_t sample_rate)
|
||||||
|
|
||||||
if (node.get_property ("end-beats-per-minute", _end_note_types_per_minute)) {
|
if (node.get_property ("end-beats-per-minute", _end_note_types_per_minute)) {
|
||||||
if (_end_note_types_per_minute < 0.0) {
|
if (_end_note_types_per_minute < 0.0) {
|
||||||
info << _("TempoSection XML node has an illegal \"in-beats-per-minute\" value") << endmsg;
|
info << _("TempoSection XML node has an illegal \"end-beats-per-minute\" value") << endmsg;
|
||||||
//throw failed_constructor();
|
throw failed_constructor();
|
||||||
_end_note_types_per_minute = _note_types_per_minute;
|
|
||||||
_legacy_end = true;
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
_legacy_end = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TempoSection::Type old_type;
|
TempoSection::Type old_type;
|
||||||
if (!node.get_property ("tempo-type", old_type)) {
|
if (!node.get_property ("tempo-type", old_type)) {
|
||||||
|
/* sessions with a tempo-type node contain no end-beats-per-minute.
|
||||||
|
if the legacy node indicates a constant tempo, simply fill this in with the
|
||||||
|
start tempo. otherwise we need the next neighbour to know what it will be.
|
||||||
|
*/
|
||||||
|
|
||||||
if (old_type == TempoSection::Constant) {
|
if (old_type == TempoSection::Constant) {
|
||||||
_end_note_types_per_minute = _note_types_per_minute;
|
_end_note_types_per_minute = _note_types_per_minute;
|
||||||
|
} else {
|
||||||
|
_end_note_types_per_minute = -1.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4649,7 +4651,7 @@ TempoMap::set_state (const XMLNode& node, int /*version*/)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (t->legacy_end()) {
|
if (t->end_note_types_per_minute() < 0.0) {
|
||||||
fix_legacy_end_session();
|
fix_legacy_end_session();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue