Function mosaic::next_run_index#

Function Documentation#

int mosaic::next_run_index(const QStringList &existingNames, const SessionIdentity &id)#

The run index a new recording of id should take: 1 when it is the first, otherwise one past the highest run already present.

Deliberately max(highest) + 1, never count + 1. If run-02 of three is deleted, count+1 would hand run-03’s number to a different recording, so two distinct sessions would share an identity — the precise failure this whole feature exists to prevent. Returns 0 for an identity with no entities, which emits no run entity at all.