// Sets callback for opening real time MIDI input.
Sets callback for opening real time MIDI input.
Sets callback for opening real time MIDI input .
pub extern "C" fn midiInOpenCallback(
        csound: *mut raw::CSOUND,
        _userData: *mut *mut c_void,
        devName: *const c_char,
    ) -> c_int {
        catch(|| unsafe {
            let name = match CStr::from_ptr(devName).to_str() {
                Ok(s) => s,
                _ => return CSOUND_STATUS::CSOUND_ERROR,
            };
            if let Some(fun) = (*(raw::csoundGetHostData(csound) as *mut CallbackHandler))
                .callbacks
                .midi_in_open_cb
                .as_mut()
            {
                fun(&name);
            }
            CSOUND_STATUS::CSOUND_SUCCESS
        })
        .unwrap()
    }
pub extern " " fn midiInOpenCallback ( csound : * mut raw :: CSOUND , _userData : * mut * mut c_void , devName : * const c_char , ) -> c_int { catch ( | | unsafe { let name = match CStr :: from_ptr ( devName ) . to_str ( ) { Ok ( s ) => s , _ => return CSOUND_STATUS :: CSOUND_ERROR , } ; if let Some ( fun ) = ( * ( raw :: csoundGetHostData ( csound ) as * mut CallbackHandler ) ) . callbacks . midi_in_open_cb . as_mut ( ) { fun ( & name ) ; } CSOUND_STATUS :: CSOUND_SUCCESS } ) . unwrap ( ) }
Sets callback for opening real time MIDI input.
Sets callback for opening real time MIDI input .
csound
*mut raw::CSOUND
_userData
*mut *mut c_void
devName
*const c_char