[][src]Function miniaudio::ring_buffer_preallocated

pub fn ring_buffer_preallocated<T: Clone + Send>(
    subbuffer_len: usize,
    subbuffer_count: usize,
    subbuffer_stride_in_bytes: usize,
    preallocated: Box<[T]>
) -> Result<(RingBufferSend<T>, RingBufferRecv<T>), Error>

Create a sender/receiver pair for a single producer single consumer ring buffer using a preallocated buffer for items. subbfer_len is the number of items that should be contained in each subbffer, and subbuffer_count is the number of subbffers that are used to swap data between the sender and receiver.