/// Write to the circular buffer.
/// # Arguments
/// * `input` A slice with the date which will be copied into the buffer.
/// * `items` The number of elements to wrtie into the buffer.
/// # Returns
/// The actual number of items written *(0 <= n <= items)**, or an error if the number of items
/// to read/write exceeds the buffer's capacity.
Write to the circular buffer.
Write to the circular buffer .
pub fn write(&self, input: &[T], items: u32) -> Result<usize, &'static str> {
        if items as usize <= input.len() {
            return Err("your buffer has not enough capacity");
        }
        unsafe {
            Ok(csound_sys::csoundWriteCircularBuffer(
                self.csound,
                self.ptr as *mut c_void,
                input.as_ptr() as *const c_void,
                items as c_int,
            ) as usize)
        }
    }
pub fn write ( & self , input : & [ T ] , items : u32 ) -> Result < usize , & ' static str > { if items as usize <= input . len ( ) { return Err ( " " ) ; } unsafe { Ok ( csound_sys :: csoundWriteCircularBuffer ( self . csound , self . ptr as * mut c_void , input . as_ptr ( ) as * const c_void , items as c_int , ) as usize ) } }
Write to the circular buffer.
Write to the circular buffer .
The actual number of items written *(0 <= n <= items)**, or an error if the number of items
to read/write exceeds the buffer's capacity.
The actual number of items written * ( 0 < = n < = items ) ** or an error if the number of items to read / write exceeds the buffer ' s capacity .
&self
input
&[T]
items
u32