[gcompris] play piano and rhythm were not managing music bg



commit a1e5c0cf3fa67013d9a1063df43903ac8f04470d
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Thu Oct 4 00:35:37 2012 +0200

    play piano and rhythm were not managing music bg
    
    In all audio related activities, we cut the background music
    and reset it back at the end of the actvitiy.

 src/play_piano-activity/play_piano.py   |    3 +++
 src/play_rhythm-activity/play_rhythm.py |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/play_piano-activity/play_piano.py b/src/play_piano-activity/play_piano.py
index 730791a..349eec3 100644
--- a/src/play_piano-activity/play_piano.py
+++ b/src/play_piano-activity/play_piano.py
@@ -275,6 +275,9 @@ dialogue to\nenable the sound."), None)
         # Remove the root item removes all the others inside it
         self.rootitem.remove()
 
+        gcompris.sound.policy_set(self.saved_policy)
+        gcompris.sound.resume()
+
 
     def ok(self):
         pass
diff --git a/src/play_rhythm-activity/play_rhythm.py b/src/play_rhythm-activity/play_rhythm.py
index 5dcc431..438d1a7 100644
--- a/src/play_rhythm-activity/play_rhythm.py
+++ b/src/play_rhythm-activity/play_rhythm.py
@@ -453,6 +453,8 @@ dialogue to\nenable the sound."), None)
         self.staff.eraseAllNotes()
         # Remove the root item removes all the others inside it
         self.rootitem.remove()
+        gcompris.sound.policy_set(self.saved_policy)
+        gcompris.sound.resume()
 
     def ok(self):
         pass



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