mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-20 21:56:30 +01:00
disallow tempi of 0 ntpm or less.
This commit is contained in:
parent
31ef417cfe
commit
4a56b92b13
1 changed files with 8 additions and 0 deletions
|
|
@ -1058,6 +1058,10 @@ TempoMap::do_insert (MetricSection* section)
|
||||||
TempoSection*
|
TempoSection*
|
||||||
TempoMap::add_tempo (const Tempo& tempo, const double& pulse, const framepos_t& frame, ARDOUR::TempoSection::Type type, PositionLockStyle pls)
|
TempoMap::add_tempo (const Tempo& tempo, const double& pulse, const framepos_t& frame, ARDOUR::TempoSection::Type type, PositionLockStyle pls)
|
||||||
{
|
{
|
||||||
|
if (tempo.note_types_per_minute() <= 0.0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
TempoSection* ts = 0;
|
TempoSection* ts = 0;
|
||||||
{
|
{
|
||||||
Glib::Threads::RWLock::WriterLock lm (lock);
|
Glib::Threads::RWLock::WriterLock lm (lock);
|
||||||
|
|
@ -1073,6 +1077,10 @@ TempoMap::add_tempo (const Tempo& tempo, const double& pulse, const framepos_t&
|
||||||
void
|
void
|
||||||
TempoMap::replace_tempo (const TempoSection& ts, const Tempo& tempo, const double& pulse, const framepos_t& frame, TempoSection::Type type, PositionLockStyle pls)
|
TempoMap::replace_tempo (const TempoSection& ts, const Tempo& tempo, const double& pulse, const framepos_t& frame, TempoSection::Type type, PositionLockStyle pls)
|
||||||
{
|
{
|
||||||
|
if (tempo.note_types_per_minute() <= 0.0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const bool locked_to_meter = ts.locked_to_meter();
|
const bool locked_to_meter = ts.locked_to_meter();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue