changeset 2128:feb0e916f8bc

adapted SexyPSF timeout to the method nenolod introduced in UPSE
author mf0102 <0102@gmx.at>
date Wed, 24 Oct 2007 15:46:20 +0200
parents a40d6e66f199
children 902540201c0d
files src/sexypsf/plugin.c
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/sexypsf/plugin.c	Wed Oct 24 15:43:13 2007 +0200
+++ b/src/sexypsf/plugin.c	Wed Oct 24 15:46:20 2007 +0200
@@ -113,7 +113,9 @@
         }
 
         // timeout at the end of a file
-        sleep(4);
+        while (playback->output->buffer_playing())
+             g_usleep(10000);
+
         break;
     }
 
@@ -222,10 +224,10 @@
 
     if (tmp->length) {
         tuple = aud_tuple_new_from_filename(fn);
-	aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, tmp->length);
-	aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, tmp->artist);
-	aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, tmp->game);
-	aud_tuple_associate_string(tuple, -1, "game", tmp->game);
+        aud_tuple_associate_int(tuple, FIELD_LENGTH, NULL, tmp->length);
+        aud_tuple_associate_string(tuple, FIELD_ARTIST, NULL, tmp->artist);
+        aud_tuple_associate_string(tuple, FIELD_ALBUM, NULL, tmp->game);
+        aud_tuple_associate_string(tuple, -1, "game", tmp->game);
         aud_tuple_associate_string(tuple, FIELD_TITLE, NULL, tmp->title);
         aud_tuple_associate_string(tuple, FIELD_GENRE, NULL, tmp->genre);
         aud_tuple_associate_string(tuple, FIELD_COPYRIGHT, NULL, tmp->copyright);