From: P. F. Chimento Date: Sun, 30 Jan 2011 12:44:25 +0000 (+0100) Subject: Stop playing old sound when playing new sound X-Git-Tag: v0.9~152^2~8 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=f3d667ede27d019fc0728cc6d2bcf71854cf2d03;p=projects%2Fchimara%2Fchimara.git Stop playing old sound when playing new sound Sound playing now stops any previous sound already playing on that sound channel. --- diff --git a/libchimara/schannel.c b/libchimara/schannel.c index 4ec75c0..036c760 100644 --- a/libchimara/schannel.c +++ b/libchimara/schannel.c @@ -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) {