|
From: Tapio V. <aa...@us...> - 2011-01-24 19:37:10
|
Module: editor
Branch: master
Commit: 93a7787b0dbb2fee540825367eb8e22976c2296f
Author: Tapio Vierros <tap...@gm...>
Date: Mon Jan 24 21:33:30 2011 +0200
SS XML writer fix: Much better sync due to improved SLEEP handling.
---
songwriter-xml.cc | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/songwriter-xml.cc b/songwriter-xml.cc
index 57ec88e..694a43a 100644
--- a/songwriter-xml.cc
+++ b/songwriter-xml.cc
@@ -66,19 +66,19 @@ void SingStarXMLWriter::writeXML() {
if (n.type == Note::GOLDEN) noteElem.setAttribute("Bonus", "Yes");
if (n.type == Note::FREESTYLE) noteElem.setAttribute("FreeStyle", "Yes");
sentenceElem.appendChild(noteElem);
+ }
- // Construct a second note element, indicationg the pause before next note
- // This is only done if the pause has duration
- int pauseLen = 0;
- if (i < notes.size() - 1)
- pauseLen = sec2dur(notes[i+1].begin - n.end); // Difference to next note
- if (pauseLen > 0) {
- QDomElement pauseElem = doc.createElement("NOTE");
- pauseElem.setAttribute("MidiNote", "0");
- pauseElem.setAttribute("Duration", QString::number(pauseLen));
- pauseElem.setAttribute("Lyric", "");
- sentenceElem.appendChild(pauseElem);
- }
+ // Construct a note element, indicationg the pause before next note
+ // This is only done if the pause has duration
+ int pauseLen = 0;
+ if (i < notes.size() - 1)
+ pauseLen = sec2dur(notes[i+1].begin - n.end); // Difference to next note
+ if (pauseLen > 0) {
+ QDomElement pauseElem = doc.createElement("NOTE");
+ pauseElem.setAttribute("MidiNote", "0");
+ pauseElem.setAttribute("Duration", QString::number(pauseLen));
+ pauseElem.setAttribute("Lyric", "");
+ sentenceElem.appendChild(pauseElem);
}
}
|