Stop playing old sound when playing new sound
authorP. F. Chimento <philip.chimento@gmail.com>
Sun, 30 Jan 2011 12:44:25 +0000 (13:44 +0100)
committerP. F. Chimento <philip.chimento@gmail.com>
Sun, 30 Jan 2011 12:44:25 +0000 (13:44 +0100)
Sound playing now stops any previous sound already playing on that sound
channel.

libchimara/schannel.c

index 4ec75c0985c1df4ea8555ffc2434a0fa2155dc1c..036c76094b4b1939373d7f6ca4e382ba90cef6a3 100644 (file)
@@ -371,8 +371,11 @@ glui32
 glk_schannel_play_ext(schanid_t chan, glui32 snd, glui32 repeats, glui32 notify)
 {
        VALID_SCHANNEL(chan, return 0);
-#ifdef GSTREAMER_SOUND
+#ifdef GSTREAMER_SOUND 
        ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
+
+       /* Stop the previous sound */
+       clean_up_after_playing_sound(chan);
        
        if(!glk_data->resource_map) {
                if(!glk_data->resource_load_callback) {