13
0

BBT markers must define an on-beat position

This commit is contained in:
Paul Davis 2023-07-24 16:19:56 -06:00
parent 86d818e4b9
commit 7fbe17c802

View File

@ -1497,6 +1497,13 @@ MusicTimePoint*
TempoMap::add_or_replace_bartime (MusicTimePoint* mtp)
{
bool replaced;
/* A MusicTimePoint by definition defines a beat position. It's not
* zero, but it must be "on beat". So ensure that this is true.
*/
mtp->set (mtp->sclock(), mtp->beats().round_up_to_beat(), mtp->bbt());
MusicTimePoint* ret = core_add_bartime (mtp, replaced);
if (!replaced) {