/// Kills off one or more running instances of an instrument.
/// # Arguments
/// * `instr` The numeric identifier of the instrument.
/// * `name` The string identifier of the instrument or name. If it is None, the instrument
/// numeric identifier is used.
/// * `mode` is a sum of the following values: 0,1,2: kill all instances (1), oldest only (1), or newest (2)
/// 4: only turnoff notes with exactly matching (fractional) instr number
/// 8: only turnoff notes with indefinite duration (p3 < 0 or MIDI).
/// * `allow_release` if true, the killed instances are allowed to release.
Kills off one or more running instances of an instrument.
Kills off one or more running instances of an instrument .
pub fn kill_instrument(
        &self,
        instr: f64,
        name: Option<&str>,
        mode: u32,
        allow_release: bool,
    ) -> Status {
        let cname = CString::new(name.unwrap_or_else(|| "")).unwrap();
        unsafe {
            Status::from(csound_sys::csoundKillInstance(
                self.engine.csound,
                instr as c_double,
                cname.as_ptr() as *mut c_char,
                mode as c_int,
                allow_release as c_int,
            ) as i32)
        }
    }
pub fn kill_instrument ( & self , instr : f64 , name : Option < & str > , mode : u32 , allow_release : bool , ) -> Status { let cname = CString :: new ( name . unwrap_or_else ( | | " " ) ) . unwrap ( ) ; unsafe { Status :: from ( csound_sys :: csoundKillInstance ( self . engine . csound , instr as c_double , cname . as_ptr ( ) as * mut c_char , mode as c_int , allow_release as c_int , ) as i32 ) } }
Kills off one or more running instances of an instrument.
Kills off one or more running instances of an instrument .
&self
instr
f64
name
Option<&str>
mode
u32
allow_release
bool