Merge pull request #981 from manongjohn/fix_sound_rendered_early

Fix rendered sound starting too soon
This commit is contained in:
manongjohn 2022-04-22 07:15:16 -04:00 committed by GitHub
commit e6b2fe450e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,6 +81,12 @@ void getRange(ToonzScene *scene, bool isPreview, int &from, int &to) {
int r0, r1;
xs->getCellRange(k, r0, r1);
// Sound columns should be based on frame 0 for timing purposes
TXshColumn *col = xs->getColumn(k);
TXshSoundColumn *sndCol = col ? col->getSoundColumn() : 0;
if (sndCol) r0 = 0;
from = std::min(from, r0), to = std::max(to, r1);
}
}