[gcompris] lang activity: added support to play audio



commit a3f39f8b55582bc91a3111ca816719f821e75a38
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sun Nov 6 21:01:12 2011 +0100

    lang activity: added support to play audio

 src/lang-activity/lang.py                    |    6 ++----
 src/lang-activity/resources/lang/lang.xml.in |   18 +++++++++---------
 2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/src/lang-activity/lang.py b/src/lang-activity/lang.py
index a33cdd6..68970a4 100644
--- a/src/lang-activity/lang.py
+++ b/src/lang-activity/lang.py
@@ -109,7 +109,6 @@ class Gcompris_lang:
     self.displayLesson( self.currentLesson )
 
   def end(self):
-    print "lang end"
     # Remove the root item removes all the others inside it
     self.rootitem.remove()
 
@@ -119,8 +118,7 @@ class Gcompris_lang:
 
 
   def repeat(self):
-    print("lang repeat.")
-
+    self.playVoice( self.currentLesson.getTriplets()[self.currentTripletId] )
 
   def config(self):
     print("lang config.")
@@ -240,13 +238,13 @@ class Gcompris_lang:
       alignment = pango.ALIGN_CENTER
       )
     self.displayImage( lesson.getTriplets()[self.currentTripletId] )
-    self.playVoice( lesson.getTriplets()[self.currentTripletId] )
 
   def playVoice(self, triplet):
     if triplet.voice:
       gcompris.sound.play_ogg("voices/$LOCALE/" + triplet.voice)
 
   def displayImage(self, triplet):
+    self.playVoice( triplet )
     self.descriptionitem.set_properties (
       text = triplet.description,
       )
diff --git a/src/lang-activity/resources/lang/lang.xml.in b/src/lang-activity/resources/lang/lang.xml.in
index 77034ce..ff798f2 100644
--- a/src/lang-activity/resources/lang/lang.xml.in
+++ b/src/lang-activity/resources/lang/lang.xml.in
@@ -581,55 +581,55 @@
       <Triplet>
 	<description>one apple</description>
 	<image>numbers/one.svg</image>
-	<voice>alphabet/1.ogg</voice>
+	<voice>alphabet/U0031.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>two oranges</description>
 	<image>numbers/orange.svg</image>
-	<voice>alphabet/2.ogg</voice>
+	<voice>alphabet/U0032.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>three strawberries</description>
 	<image>numbers/strawberries.svg</image>
-	<voice>alphabet/3.ogg</voice>
+	<voice>alphabet/U0033.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>four lemons</description>
 	<image>numbers/lemon.svg</image>
-	<voice>alphabet/4.ogg</voice>
+	<voice>alphabet/U0034.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>five pears</description>
 	<image>numbers/pear.svg</image>
-	<voice>alphabet/5.ogg</voice>
+	<voice>alphabet/U0035.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>six bananas</description>
 	<image>numbers/banana.svg</image>
-	<voice>alphabet/6.ogg</voice>
+	<voice>alphabet/U0036.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>seven raspberries</description>
 	<image>numbers/raspberries.svg</image>
-	<voice>alphabet/7.ogg</voice>
+	<voice>alphabet/U0037.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>eight pineapples</description>
 	<image>numbers/pineapples.svg</image>
-	<voice>alphabet/8.ogg</voice>
+	<voice>alphabet/U0038.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>
 	<description>nine mangos</description>
 	<image>numbers/mango.svg</image>
-	<voice>alphabet/9.ogg</voice>
+	<voice>alphabet/U0039.ogg</voice>
 	<c:type></c:type>
       </Triplet>
       <Triplet>



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