changeset 1270:d73eed18f3f4

make tta decode easy to be interrupted.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Sun, 15 Jul 2007 19:22:12 +0900
parents 0e160bafce1c
children 173a67e7e4f8
files src/tta/libtta.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tta/libtta.c	Sun Jul 15 19:06:04 2007 +0900
+++ b/src/tta/libtta.c	Sun Jul 15 19:22:12 2007 +0900
@@ -235,11 +235,17 @@
 		    playback->output->flush (seek_position * SEEK_STEP);
 		    seek_position = -1;
 		}
+		if(!playing)
+			goto DONE;
 	    }
 
 	    playback->output->buffer_free ();
 	    playback->output->buffer_free ();
-	    xmms_usleep(10000);
+	    while (playback->output->buffer_playing()) {
+		    xmms_usleep(10000);
+		    if(!playing)
+			    goto DONE;
+	    }
 	}
 
 DONE: