diff --git a/src/track/beatgrid.cpp b/src/track/beatgrid.cpp index 457c25fcf54..978e3cce8b6 100644 --- a/src/track/beatgrid.cpp +++ b/src/track/beatgrid.cpp @@ -333,8 +333,7 @@ BeatsPointer BeatGrid::scale(enum BPMScale scale) const { return BeatsPointer(new BeatGrid(*this)); } - // TODO: Check if we can remove getMaxBpm and replace it with Bpm::hasValue instead - if (bpm.getValue() > getMaxBpm()) { + if (!bpm.hasValue()) { return BeatsPointer(new BeatGrid(*this)); } @@ -345,9 +344,8 @@ BeatsPointer BeatGrid::scale(enum BPMScale scale) const { } BeatsPointer BeatGrid::setBpm(mixxx::Bpm bpm) { - // FIXME: Shouldn't we use mixxx::Bpm::hasValue() here? - if (bpm.getValue() > getMaxBpm()) { - bpm.setValue(getMaxBpm()); + VERIFY_OR_DEBUG_ASSERT(bpm.hasValue()) { + return nullptr; } mixxx::track::io::BeatGrid grid = m_grid; grid.mutable_bpm()->set_bpm(bpm.getValue()); diff --git a/src/track/beats.h b/src/track/beats.h index c87889da3f8..bddbd04bb71 100644 --- a/src/track/beats.h +++ b/src/track/beats.h @@ -10,10 +10,6 @@ #include "util/memory.h" #include "util/types.h" -namespace { - double kMaxBpm = 500; -} - namespace mixxx { class Beats; @@ -132,10 +128,6 @@ class Beats { // BPM returns -1. virtual mixxx::Bpm getBpmAroundPosition(double curSample, int n) const = 0; - virtual double getMaxBpm() const { - return kMaxBpm; - } - virtual audio::SampleRate getSampleRate() const = 0; //////////////////////////////////////////////////////////////////////////// diff --git a/src/track/bpm.h b/src/track/bpm.h index 02073458a56..1a1454a328f 100644 --- a/src/track/bpm.h +++ b/src/track/bpm.h @@ -12,7 +12,7 @@ class Bpm final { public: static constexpr double kValueUndefined = 0.0; static constexpr double kValueMin = 0.0; // lower bound (exclusive) - static constexpr double kValueMax = 300.0; // higher bound (inclusive) + static constexpr double kValueMax = 500.0; // higher bound (inclusive) constexpr Bpm() : Bpm(kValueUndefined) {