Version
3.5-1594
Branch
mixer-rewrite
Date
9 years, 9 months ago
Windows x64 Windows x86 Mac OS X Android
Commit
afcc586eb9ae8d8af4d4054fab3a5b3ceeeb6897
Change author
Pierre Bourdon
Change description
Fix the RingBuffer implementation

* ReadableCount() previously returned wrong values: for example:

    0 1 2 3 4 5 6 7 8 9        N=10
        W     R

  There are 7 readable elements (5,6,7,8,9,0,1), but ReadableCount() previously
  returned (r - w) which is 3.

* WritableCount() allowed the buffer to get full even though the RingBuffer API
  specified that you should never let the buffer fill up.