[xiph-commits] r12228 - trunk/vorbis-tools/ogg123

conrad at svn.xiph.org conrad at svn.xiph.org
Tue Dec 19 21:00:00 PST 2006


Author: conrad
Date: 2006-12-19 20:59:58 -0800 (Tue, 19 Dec 2006)
New Revision: 12228

Modified:
   trunk/vorbis-tools/ogg123/remote.c
Log:
ogg123/remote.c: apply patch from Honza, as described in the following message to vorbis-dev:
http://thread.gmane.org/gmane.comp.multimedia.ogg.vorbis.devel/3993/focus=3997


Modified: trunk/vorbis-tools/ogg123/remote.c
===================================================================
--- trunk/vorbis-tools/ogg123/remote.c	2006-12-18 06:08:37 UTC (rev 12227)
+++ trunk/vorbis-tools/ogg123/remote.c	2006-12-20 04:59:58 UTC (rev 12228)
@@ -309,6 +309,7 @@
        
       send_msg("I %s", fname);
       send_msg("S 0.0 0 00000 xxxxxx 0 0 0 0 0 0 0 0");
+      send_msg("P 2");
       pthread_mutex_lock(&main_lock);
       setstatus(PLAY);
       s = getstatus();
@@ -334,17 +335,18 @@
       s = getstatus();
       pthread_mutex_unlock(&main_lock);
 
-      if (s == NEXT) {
+/* don't know why this was here, sending "play stoped" on NEXT wasn't good idea... */
+//      if (s == NEXT) {
 	  
 	    /* Send "play stopped" */
-        send_msg("P 0");
-        send_log("P 0");
-      } else {
+//        send_msg("P 0");
+//        send_log("P 0");
+//      } else {
 	  
 	    /* Send "play stopped at eof" */
-        send_msg("P 0 EOF");
-        send_log("P 0 EOF");
-      }
+//        send_msg("P 0 EOF");
+//        send_log("P 0 EOF");
+//      }
       
     }
     else {
@@ -404,6 +406,10 @@
     send_msg("P 2");
   }
 
+    /* Send stop msg to the frontend */
+    /* this probably should be done after the audio buffer is flushed and no audio is actually playing, but don't know how */
+  if ((s == STOP) || (s == QUIT)) send_msg("P 0");
+
   send_log("playloop exit s=%d", s);
 
   return ((s == NEXT) || (s == STOP) || (s == QUIT));



More information about the commits mailing list