diff options
-rw-r--r-- | src/cubeb_ring_array.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/cubeb_ring_array.h b/src/cubeb_ring_array.h index ba1ed76..331d047 100644 --- a/src/cubeb_ring_array.h +++ b/src/cubeb_ring_array.h @@ -47,7 +47,7 @@ single_audiobuffer_init(AudioBuffer * buffer, uint32_t bytesPerFrame, /** Initialize the ring array. @param ra The ring_array pointer of allocated structure. @retval 0 on success. */ -int +static int ring_array_init(ring_array * ra, uint32_t capacity, uint32_t bytesPerFrame, uint32_t channelsPerFrame, uint32_t framesPerBuffer) { @@ -79,7 +79,7 @@ ring_array_init(ring_array * ra, uint32_t capacity, uint32_t bytesPerFrame, /** Destroy the ring array. @param ra The ring_array pointer.*/ -void +static void ring_array_destroy(ring_array * ra) { assert(ra); @@ -98,7 +98,7 @@ ring_array_destroy(ring_array * ra) @param ra The ring_array pointer. @retval Pointer of the allocated space to be stored with fresh data or NULL if full. */ -AudioBuffer * +static AudioBuffer * ring_array_get_free_buffer(ring_array * ra) { assert(ra && ra->buffer_array); @@ -119,7 +119,7 @@ ring_array_get_free_buffer(ring_array * ra) /** Get the next available buffer with data. @param ra The ring_array pointer. @retval Pointer of the next in order data buffer or NULL if empty. */ -AudioBuffer * +static AudioBuffer * ring_array_get_data_buffer(ring_array * ra) { assert(ra && ra->buffer_array); @@ -139,18 +139,4 @@ ring_array_get_data_buffer(ring_array * ra) return ret; } -/** When array is empty get the first allocated buffer in the array. - @param ra The ring_array pointer. - @retval If arrays is empty, pointer of the allocated space else NULL. */ -AudioBuffer * -ring_array_get_dummy_buffer(ring_array * ra) -{ - assert(ra && ra->buffer_array); - assert(ra->capacity > 0); - if (ra->count > 0) { - return NULL; - } - return &ra->buffer_array[0]; -} - #endif // CUBEB_RING_ARRAY_H |