jack.c.ringbuffer

Undocumented in source.

Members

Functions

jack_ringbuffer_create
jack_ringbuffer_t* jack_ringbuffer_create(size_t sz)

Allocates a ringbuffer data structure of a specified size. The caller must arrange for a call to jack_ringbuffer_free() to release the memory associated with the ringbuffer.

jack_ringbuffer_free
void jack_ringbuffer_free(jack_ringbuffer_t* rb)

Frees the ringbuffer data structure allocated by an earlier call to jack_ringbuffer_create().

jack_ringbuffer_get_read_vector
void jack_ringbuffer_get_read_vector(const(jack_ringbuffer_t)* rb, jack_ringbuffer_data_t* vec)

Fill a data structure with a description of the current readable data held in the ringbuffer. This description is returned in a two element array of jack_ringbuffer_data_t. Two elements are needed because the data to be read may be split across the end of the ringbuffer.

jack_ringbuffer_get_write_vector
void jack_ringbuffer_get_write_vector(const(jack_ringbuffer_t)* rb, jack_ringbuffer_data_t* vec)

Fill a data structure with a description of the current writable space in the ringbuffer. The description is returned in a two element array of jack_ringbuffer_data_t. Two elements are needed because the space available for writing may be split across the end of the ringbuffer.

jack_ringbuffer_mlock
int jack_ringbuffer_mlock(jack_ringbuffer_t* rb)

Lock a ringbuffer data block into memory.

jack_ringbuffer_peek
size_t jack_ringbuffer_peek(jack_ringbuffer_t* rb, char* dest, size_t cnt)

Read data from the ringbuffer. Opposed to jack_ringbuffer_read() this function does not move the read pointer. Thus it's a convenient way to inspect data in the ringbuffer in a continous fashion. The price is that the data is copied into a user provided buffer. For "raw" non-copy inspection of the data in the ringbuffer use jack_ringbuffer_get_read_vector().

jack_ringbuffer_read
size_t jack_ringbuffer_read(jack_ringbuffer_t* rb, char* dest, size_t cnt)

Read data from the ringbuffer.

jack_ringbuffer_read_advance
void jack_ringbuffer_read_advance(jack_ringbuffer_t* rb, size_t cnt)

Advance the read pointer.

jack_ringbuffer_read_space
size_t jack_ringbuffer_read_space(const(jack_ringbuffer_t)* rb)

Return the number of bytes available for reading.

jack_ringbuffer_reset
void jack_ringbuffer_reset(jack_ringbuffer_t* rb)

Reset the read and write pointers, making an empty buffer.

jack_ringbuffer_reset_size
void jack_ringbuffer_reset_size(jack_ringbuffer_t* rb, size_t sz)

Reset the internal "available" size, and read and write pointers, making an empty buffer.

jack_ringbuffer_write
size_t jack_ringbuffer_write(jack_ringbuffer_t* rb, const(char)* src, size_t cnt)

Write data into the ringbuffer.

jack_ringbuffer_write_advance
void jack_ringbuffer_write_advance(jack_ringbuffer_t* rb, size_t cnt)

Advance the write pointer.

jack_ringbuffer_write_space
size_t jack_ringbuffer_write_space(const(jack_ringbuffer_t)* rb)

Return the number of bytes available for writing.

Structs

jack_ringbuffer_data_t
struct jack_ringbuffer_data_t

@file ringbuffer.h

jack_ringbuffer_t
struct jack_ringbuffer_t
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta