changeset 1205:c39a61e6a276

Fine-tune fadeout
author mf0102 <0102@gmx.at>
date Wed, 04 Jul 2007 10:43:33 +0200
parents e9f10dac2f63
children c1dcc9d38f98
files src/sexypsf/plugin.c
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/sexypsf/plugin.c	Tue Jul 03 12:15:45 2007 +0200
+++ b/src/sexypsf/plugin.c	Wed Jul 04 10:43:33 2007 +0200
@@ -62,11 +62,13 @@
     {
         int t = playback->output->buffer_free() & mask;
         if (t > count)     
-            produce_audio(playback->output->written_time(), FMT_S16_NE, 2, count, buffer, NULL);
+            produce_audio(playback->output->written_time(),
+                          FMT_S16_NE, 2, count, buffer, NULL);
         else
         {
             if (t)
-                produce_audio(playback->output->written_time(), FMT_S16_NE, 2, t, buffer, NULL);
+                produce_audio(playback->output->written_time(),
+                              FMT_S16_NE, 2, t, buffer, NULL);
             g_usleep((count-t)*1000*5/441/2);
         }
         count -= t;
@@ -113,7 +115,8 @@
             continue;
         }
 
-        sleep(2);
+        // timeout at the end of a file
+        sleep(4);
         break;
     }
 
@@ -201,6 +204,7 @@
         return -1;
     if (!playing)
         return 0;
+
     return playback->output->output_time();
 }