Logo Search packages:      
Sourcecode: jamin version File versions

size_t jack_ringbuffer_read_space ( const jack_ringbuffer_t *  rb  ) 

Return the number of bytes available for reading.

Parameters:
rb a pointer to the ringbuffer structure.
Returns:
the number of bytes available to read.

Definition at line 97 of file ringbuffer.c.

{
  size_t w, r;

  w = rb->write_ptr;
  r = rb->read_ptr;

  if (w > r) {
    return w - r;
  } else {
    return (w - r + rb->size) & rb->size_mask;
  }
}


Generated by  Doxygen 1.6.0   Back to index