changeset 1516:d1671cf98196

fixed lock in sid playback when doing fast song switching
author Giacomo Lozito <james@develia.org>
date Thu, 23 Aug 2007 03:20:10 +0200
parents fc1b025e6900
children d72a44fdb6a3
files src/sid/xmms-sid.c
diffstat 1 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/sid/xmms-sid.c	Wed Aug 22 23:52:25 2007 +0100
+++ b/src/sid/xmms-sid.c	Thu Aug 23 03:20:10 2007 +0200
@@ -290,6 +290,14 @@
 }
 
 
+static gboolean xs_schedule_subctrl_update( gpointer unused )
+{
+	if (xs_status.isPlaying == TRUE )
+		xs_subctrl_update();
+	return FALSE;
+}
+
+
 /*
  * Main playing thread loop
  */
@@ -387,9 +395,7 @@
 
 		XSDEBUG("subtune #%i selected, initializing...\n", myStatus.currSong);
 
-		GDK_THREADS_ENTER();
-		xs_subctrl_update();
-		GDK_THREADS_LEAVE();
+		g_idle_add_full( G_PRIORITY_HIGH_IDLE , xs_schedule_subctrl_update , NULL , NULL );
 
 		/* Check minimum playtime */
 		songLength = myTune->subTunes[myStatus.currSong-1].tuneLength;