[gcompris] gcomprismusic, fixed a major play issue.



commit 01e6acb0a95f0b8acc10d3fc508b4dcc09c25a3b
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Mon Oct 22 23:49:41 2012 +0200

    gcomprismusic, fixed a major play issue.
    
    In the play composition, the timer was run twice. It was not
    always easy to ear it but notes were played twice and the notes had
    glitches.

 src/piano_composition-activity/gcomprismusic.py |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/src/piano_composition-activity/gcomprismusic.py b/src/piano_composition-activity/gcomprismusic.py
index 0214c45..a790574 100644
--- a/src/piano_composition-activity/gcomprismusic.py
+++ b/src/piano_composition-activity/gcomprismusic.py
@@ -482,7 +482,7 @@ class Staff():
             self.notReadyToPlay = False
             if hasattr(self, 'verticalPlayLine'):
                  self.verticalPlayLine.remove()
-            return
+            return False
 
         note = self.noteList[noteIndexToPlay]
 
@@ -505,7 +505,7 @@ class Staff():
 
         gobject.timeout_add(self.noteList[noteIndexToPlay].millisecs,
                             self.play_it, noteIndexToPlay + 1, playingLineOnly)
-
+        return False
 
     def playComposition(self, widget=None, target=None, event=None,
                         playingLineOnly=False):
@@ -523,9 +523,6 @@ class Staff():
 
         self.currentNoteIndex = 0
         self.play_it(0, playingLineOnly)
-        gobject.timeout_add(self.noteList[self.currentNoteIndex].millisecs,
-                            self.play_it, (self.currentNoteIndex + 1),
-                            playingLineOnly)
 
     def file_to_staff(self, filename):
         '''



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]