]> Repos - portaudio/commitdiff
clarified some doc comments in pa_ringbuffer.h including one typo that said <write...
authorrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Sun, 24 Oct 2010 10:21:35 +0000 (10:21 +0000)
committerrossb <rossb@0f58301d-fd10-0410-b4af-bbb618454e57>
Sun, 24 Oct 2010 10:21:35 +0000 (10:21 +0000)
src/common/pa_ringbuffer.c
src/common/pa_ringbuffer.h

index d4801bf34eda7ddf851cd5922196944d39684249..282f4398d25d493442614b5c6e13430e19c18068 100644 (file)
@@ -91,7 +91,7 @@ ring_buffer_size_t PaUtil_GetRingBufferWriteAvailable( PaUtilRingBuffer *rbuf )
 }
 
 /***************************************************************************
-** Clear buffer. Should only be called when buffer is NOT being read. */
+** Clear buffer. Should only be called when buffer is NOT being read or written. */
 void PaUtil_FlushRingBuffer( PaUtilRingBuffer *rbuf )
 {
     rbuf->writeIndex = rbuf->readIndex = 0;
index 89460e091c6b0b658b153559486f9830a9ad2260..f8318d8e9b88d3ed975db44acb50140fd084f942 100644 (file)
@@ -98,13 +98,13 @@ typedef struct PaUtilRingBuffer
     char  *buffer;    /**< Pointer to the buffer containing the actual data. */
 }PaUtilRingBuffer;
 
-/** Initialize Ring Buffer.
+/** Initialize Ring Buffer to empty state ready to have elements written to it.
 
  @param rbuf The ring buffer.
 
  @param elementSizeBytes The size of a single data element in bytes.
 
- @param elementCount The number of elements in the buffer (must be power of 2).
+ @param elementCount The number of elements in the buffer (must be power of 2).
 
  @param dataPtr A pointer to a previously allocated area where the data
  will be maintained.  It must be elementCount*elementSizeBytes long.
@@ -113,7 +113,7 @@ typedef struct PaUtilRingBuffer
 */
 ring_buffer_size_t PaUtil_InitializeRingBuffer( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementSizeBytes, ring_buffer_size_t elementCount, void *dataPtr );
 
-/** Clear buffer. Should only be called when buffer is NOT being read.
+/** Reset buffer to empty. Should only be called when buffer is NOT being read or written.
 
  @param rbuf The ring buffer.
 */
@@ -193,7 +193,7 @@ ring_buffer_size_t PaUtil_GetRingBufferWriteRegions( PaUtilRingBuffer *rbuf, rin
 */
 ring_buffer_size_t PaUtil_AdvanceRingBufferWriteIndex( PaUtilRingBuffer *rbuf, ring_buffer_size_t elementCount );
 
-/** Get address of region(s) from which we can write data.
+/** Get address of region(s) from which we can read data.
 
  @param rbuf The ring buffer.