Add static keyword to fix build of tests in unified builds

This commit is contained in:
Paul Adenot 2023-11-21 10:29:04 +01:00
Родитель 5707d0e447
Коммит 699c44180e
1 изменённых файлов: 4 добавлений и 18 удалений

Просмотреть файл

@ -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