Round syllable durations to centiseconds when splitting syllables

This commit is contained in:
Thomas Goyne 2012-11-30 16:25:20 -08:00
parent af35e50810
commit ffef9a1485

View file

@ -202,7 +202,7 @@ void AssKaraoke::AddSplit(size_t syl_idx, size_t pos) {
syl.duration = 0; syl.duration = 0;
} }
else { else {
new_syl.duration = syl.duration * new_syl.text.size() / (syl.text.size() + new_syl.text.size()); new_syl.duration = (syl.duration * new_syl.text.size() / (syl.text.size() + new_syl.text.size()) + 5) / 10 * 10;
syl.duration -= new_syl.duration; syl.duration -= new_syl.duration;
} }