[xiph-commits] r14036 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Mon Oct 22 23:22:36 PDT 2007


Author: jm
Date: 2007-10-22 23:22:36 -0700 (Mon, 22 Oct 2007)
New Revision: 14036

Modified:
   trunk/speex/libspeex/buffer.c
Log:
oops, forgot to advange the pointers in the ring buffer


Modified: trunk/speex/libspeex/buffer.c
===================================================================
--- trunk/speex/libspeex/buffer.c	2007-10-22 15:35:03 UTC (rev 14035)
+++ trunk/speex/libspeex/buffer.c	2007-10-23 06:22:36 UTC (rev 14036)
@@ -85,6 +85,9 @@
       st->available = st->size;
       st->read_ptr = st->write_ptr;
    }
+   st->write_ptr += len;
+   if (st->write_ptr > st->size)
+      st->write_ptr -= st->size;
    return len;
 }
 
@@ -114,7 +117,9 @@
       st->available = st->size;
       st->read_ptr = st->write_ptr;
    }
-
+   st->write_ptr += len;
+   if (st->write_ptr > st->size)
+      st->write_ptr -= st->size;
    return len;
 }
 
@@ -138,6 +143,9 @@
       speex_move(data+end1 - st->read_ptr, st->data, end);
    }
    st->available -= len;
+   st->read_ptr += len;
+   if (st->read_ptr > st->size)
+      st->read_ptr -= st->size;
    return len;
 }
 



More information about the commits mailing list