[][src]Struct miniaudio::RingBuffer

#[repr(transparent)]pub struct RingBuffer<T: Sized> { /* fields omitted */ }

Methods

impl<T: Sized> RingBuffer<T>[src]

pub fn new(count: usize) -> Result<RingBuffer<T>, Error>[src]

pub fn new_preallocated(preallocated: Box<[T]>) -> Result<RingBuffer<T>, Error>[src]

pub fn read<F>(&self, count_requested: usize, f: F) -> Result<usize, Error> where
    F: FnOnce(&[T]), 
[src]

pub fn write<F>(&self, count_requested: usize, f: F) -> Result<usize, Error> where
    F: FnOnce(&mut [T]), 
[src]

pub fn pointer_distance(&self) -> usize[src]

Returns the distance between the write pointer and the read pointer. Should never be negative for a correct program. Will return the number of items that can be read before the read pointer hits the write pointer.

pub fn available_read(&self) -> usize[src]

pub fn available_write(&self) -> usize[src]

pub fn subbuffer_size(&self) -> usize[src]

pub fn subbuffer_stride(&self) -> usize[src]

pub fn subbuffer_offset(&self, index: usize) -> usize[src]

Trait Implementations

impl<T: Debug + Sized> Debug for RingBuffer<T>[src]

impl<T> Drop for RingBuffer<T>[src]

impl<T: Send + Sized> Send for RingBuffer<T>[src]

impl<T: Sync + Sized> Sync for RingBuffer<T>[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for RingBuffer<T> where
    T: RefUnwindSafe

impl<T> Unpin for RingBuffer<T> where
    T: Unpin

impl<T> UnwindSafe for RingBuffer<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.