rational: implement NaN mode

Also clarify code where 0 is used as a rational.
This commit is contained in:
itsmattkc
2021-04-17 15:04:03 +10:00
parent 88ebfb9d8e
commit 22b2d08baf
13 changed files with 132 additions and 108 deletions
+4 -1
View File
@@ -40,6 +40,9 @@ const QString Track::kMutedInput = QStringLiteral("muted_in");
Track::Track() :
track_type_(Track::kNone),
track_length_(0),
midop_track_length_(0),
preop_track_length_(0),
index_(-1),
locked_(false)
{
@@ -276,7 +279,7 @@ void Track::InputDisconnectedEvent(const QString &input, int element, const Node
if (next) {
UpdateInOutFrom(blocks_.indexOf(next));
} else if (blocks_.isEmpty()) {
SetLengthInternal(rational());
SetLengthInternal(0);
} else {
SetLengthInternal(blocks_.last()->out());
}