changeset 1036:976a54334538 trunk

[svn] - abort out of produce_audio if a stop has been requested
author nenolod
date Sat, 13 May 2006 11:20:38 -0700
parents 06ca2c6283f4
children 51f0d067f618
files audacious/output.c
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/output.c	Sat May 13 11:20:11 2006 -0700
+++ b/audacious/output.c	Sat May 13 11:20:38 2006 -0700
@@ -388,11 +388,14 @@
 	if (writable > 2048)
 	    writable = 2048;
 
-	while (op->buffer_free() < writable) { /* wait output buf          */
-	    if (going && !*going)              /*   thread stopped?        */
-		return;                        /*     so finish            */
+	while (op->buffer_free() < writable) { /* wait output buf            */
+	    if (going && !*going)              /*   thread stopped?          */
+		return;                        /*     so finish              */
 
-	    g_usleep(10000);                   /*   else sleep for retry   */
+            if (ip_data.stop)                  /* has a stop been requested? */
+	        return;                        /*     yes, so finish         */
+
+	    g_usleep(10000);                   /*   else sleep for retry     */
 	}
 
 	/* do output */