pub extern "C" fn midiReadCallback(
        csound: *mut raw::CSOUND,
        _userData: *mut c_void,
        buf: *mut c_uchar,
        nbytes: c_int,
    ) -> c_int {
        catch(|| unsafe {
            let mut out = slice::from_raw_parts_mut(buf, nbytes as usize);
            if let Some(fun) = (*(raw::csoundGetHostData(csound) as *mut CallbackHandler))
                .callbacks
                .midi_read_cb
                .as_mut()
            {
                return fun(&mut out) as c_int;
            }
            -1
        })
        .unwrap()
    }
// Sets callback for reading from real time MIDI input.
Sets callback for reading from real time MIDI input.
Sets callback for reading from real time MIDI input .
pub extern "C" fn midiReadCallback(
        csound: *mut raw::CSOUND,
        _userData: *mut c_void,
        buf: *mut c_uchar,
        nbytes: c_int,
    ) -> c_int {
        catch(|| unsafe {
            let mut out = slice::from_raw_parts_mut(buf, nbytes as usize);
            if let Some(fun) = (*(raw::csoundGetHostData(csound) as *mut CallbackHandler))
                .callbacks
                .midi_read_cb
                .as_mut()
            {
                return fun(&mut out) as c_int;
            }
            -1
        })
        .unwrap()
    }
pub extern " " fn midiReadCallback ( csound : * mut raw :: CSOUND , _userData : * mut c_void , buf : * mut c_uchar , nbytes : c_int , ) -> c_int { catch ( | | unsafe { let mut out = slice :: from_raw_parts_mut ( buf , nbytes as usize ) ; if let Some ( fun ) = ( * ( raw :: csoundGetHostData ( csound ) as * mut CallbackHandler ) ) . callbacks . midi_read_cb . as_mut ( ) { return fun ( & mut out ) as c_int ; } - 1 } ) . unwrap ( ) }
Sets callback for reading from real time MIDI input.
Sets callback for reading from real time MIDI input .
csound
*mut raw::CSOUND
_userData
*mut c_void
buf
*mut c_uchar
nbytes
c_int
csound
*mut raw::CSOUND
_userData
*mut c_void
buf
*mut c_uchar
nbytes
c_int