Skip to content
Extraits de code Groupes Projets
Valider 9009c963 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Fix rounding errors that resulted in karaoke syllables drifting

parent 004b41f0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -40,7 +40,7 @@ wxString AssKaraoke::Syllable::GetText(bool k_tag) const {
wxString ret;
if (k_tag)
ret = wxString::Format("{%s%d}", tag_type, duration / 10);
ret = wxString::Format("{%s%d}", tag_type, (duration + 5) / 10);
size_t idx = 0;
for (std::map<size_t, wxString>::const_iterator ovr = ovr_tags.begin(); ovr != ovr_tags.end(); ++ovr) {
......
......@@ -375,7 +375,7 @@ int AudioTimingControllerKaraoke::MoveMarker(KaraokeMarker *marker, int new_posi
marker->Move(new_position);
size_t syl = marker - &markers.front() + 1;
kara->SetStartTime(syl, new_position);
kara->SetStartTime(syl, (new_position + 5) / 10 * 10);
labels[syl - 1].range = TimeRange(labels[syl - 1].range.begin(), new_position);
labels[syl].range = TimeRange(new_position, labels[syl].range.end());
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter