pub fn write_audio_channel(&mut self, name: &str, input: &[f64]) {
        let size = self.get_ksmps() as usize * self.input_channels() as usize;
        let len = input.len();
        let cname = CString::new(name).unwrap();
        assert!(
            size <= len,
            "The audio channel's capacity is {} so, it isn't possible to copy {} bytes",
            size,
            len
        );
        unsafe {
            csound_sys::csoundSetAudioChannel(
                self.engine.csound,
                cname.as_ptr(),
                input.as_ptr() as *mut c_double,
            );
        }
    }
/// Writes data into an audio channel buffer. audio channel identified by *name* with data from slice *input* which should
/// contain at least ksmps f64 samples, if not, this method will panic.
/// # Arguments
/// * `input` The slice with data to be copied into the audio channel buffer. Could contain up to ksmps samples.
/// # panic
/// This method will panic if input.len() > ksmps.
Writes data into an audio channel buffer. audio channel identified by *name* with data from slice *input* which should
contain at least ksmps f64 samples, if not, this method will panic.
Writes data into an audio channel buffer . audio channel identified by * name * with data from slice * input * which should contain at least ksmps f64 samples if not this method will panic .
pub fn write_audio_channel(&mut self, name: &str, input: &[f64]) {
        let size = self.get_ksmps() as usize * self.input_channels() as usize;
        let len = input.len();
        let cname = CString::new(name).unwrap();
        assert!(
            size <= len,
            "The audio channel's capacity is {} so, it isn't possible to copy {} bytes",
            size,
            len
        );
        unsafe {
            csound_sys::csoundSetAudioChannel(
                self.engine.csound,
                cname.as_ptr(),
                input.as_ptr() as *mut c_double,
            );
        }
    }
pub fn write_audio_channel ( & mut self , name : & str , input : & [ f64 ] ) { let size = self . get_ksmps ( ) as usize * self . input_channels ( ) as usize ; let len = input . len ( ) ; let cname = CString :: new ( name ) . unwrap ( ) ; assert ! ( size len " " size len ) ; unsafe { csound_sys :: csoundSetAudioChannel ( self . engine . csound , cname . as_ptr ( ) , input . as_ptr ( ) as * mut c_double , ) ; } }
Writes data into an audio channel buffer.
Writes data into an audio channel buffer .
&mut self
name
&str
input
&[f64]
&mut self
name
&str
input
&[f64]
panic
This method will panic if input.len() > ksmps.
This method will panic if input . len () > ksmps .