LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File xmms-1.2.11-crossfade-0.3.9.diff of Package xmms (Project home:donharter:home:FreeCAD)

--- xmms/input.c
+++ xmms/input.c
@@ -286,6 +286,14 @@
 	}
 }
 
+gboolean input_stopped_for_restart = FALSE;  /* crossfade */
+void input_stop_for_restart()  /* crossfade */
+{
+	input_stopped_for_restart = TRUE;
+	input_stop();
+	input_stopped_for_restart = FALSE;
+}
+
 void input_stop(void)
 {
 	if (ip_data->playing && get_current_input_plugin())
--- xmms/input.h
+++ xmms/input.h
@@ -34,6 +34,7 @@
 gboolean input_check_file(gchar * filename);
 void input_play(char *filename);
 void input_stop(void);
+void input_stop_for_restart(void);
 void input_pause(void);
 int input_get_time(void);
 void input_set_eq(int on, float preamp, float *bands);
--- xmms/main.c
+++ xmms/main.c
@@ -927,8 +927,10 @@
 	mainwin_set_shade(!cfg.player_shaded);
 }
 
+gboolean is_quitting = FALSE;  /* crossfade */
 void mainwin_quit_cb(void)
 {
+	is_quitting = TRUE;  /* crossfade */
 	input_stop();
 	gtk_widget_hide(equalizerwin);
 	gtk_widget_hide(playlistwin);
@@ -1579,7 +1581,8 @@
 		int *pos;
 
 		if (get_input_playing())
-			input_stop();
+			input_stop_for_restart();
+		
 		pos = gtk_clist_get_row_data(clist, GPOINTER_TO_INT(clist->selection->data));
 		playlist_set_position(*pos);
 		playlist_play();
--- xmms/playlist.c
+++ xmms/playlist.c
@@ -141,7 +141,7 @@
 		if (get_input_playing())
 		{
 			PL_UNLOCK();
-			input_stop();
+			input_stop_for_restart();
 			PL_LOCK();
 			*restart_playing = TRUE;
 		}
@@ -582,7 +582,7 @@
 	}
 
 	if (get_input_playing())
-		input_stop();
+		input_stop_for_restart();
 
 	vis_clear_data(mainwin_vis);
 	vis_clear_data(playlistwin_vis);
@@ -680,7 +680,7 @@
 	{
 		/* We need to stop before changing playlist_position */
 		PL_UNLOCK();
-		input_stop();
+		input_stop_for_restart();
 		PL_LOCK();
 		restart_playing = TRUE;
 	}
@@ -735,7 +735,7 @@
 	{
 		/* We need to stop before changing playlist_position */
 		PL_UNLOCK();
-		input_stop();
+		input_stop_for_restart();
 		PL_LOCK();
 		restart_playing = TRUE;
 	}
@@ -886,7 +886,7 @@
 	{
 		/* We need to stop before changing playlist_position */
 		PL_UNLOCK();
-		input_stop();
+		input_stop_for_restart();
 		PL_LOCK();
 		restart_playing = TRUE;
 	}