[−][src]Struct miniaudio::RingBuffer
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]
F: FnOnce(&[T]),
pub fn write<F>(&self, count_requested: usize, f: F) -> Result<usize, Error> where
F: FnOnce(&mut [T]),
[src]
F: FnOnce(&mut [T]),
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,
T: RefUnwindSafe,
impl<T> Unpin for RingBuffer<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for RingBuffer<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,