[xiph-cvs] cvs commit: ices/src stream.c

Brendan brendan at xiph.org
Mon Mar 10 14:58:50 PST 2003



brendan     03/03/10 17:58:50

  Modified:    src      stream.c
  Log:
  Sleep AFTER reencoding - don't waste those cycles if you need them.
  This file needs a rewrite.

Revision  Changes    Path
1.44      +3 -1      ices/src/stream.c

Index: stream.c
===================================================================
RCS file: /cvs/ice/ices/src/stream.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- stream.c	5 Mar 2003 16:15:44 -0000	1.43
+++ stream.c	10 Mar 2003 22:58:50 -0000	1.44
@@ -203,6 +203,7 @@
           /* don't reencode if the source is MP3 and the same bitrate */
           if (!stream->reencode || (source->read &&
                                     (stream->bitrate == source->bitrate))) {
+	    shout_sync(stream->conn);
             rc = stream_send_data (stream, ibuf, len);
           }
 #ifdef HAVE_LIBLAME
@@ -213,6 +214,8 @@
             if (olen == -1) {
               ices_log_debug ("Output buffer too small, skipping chunk");
             } else if (olen > 0) {
+	      shout_sync(stream->conn);
+	      ices_log_debug ("Sending %d bytes", olen);
               rc = stream_send_data (stream, obuf, olen);
             }
           }
@@ -328,7 +331,6 @@
 
   if (shout_get_connected (stream->conn) == SHOUTERR_CONNECTED) {
     if (shout_send (stream->conn, buf, len) == SHOUTERR_SUCCESS) {
-      shout_sync (stream->conn);
       stream->errs = 0;
       rc = 0;
     } else {

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list