var searchIndex = {}; searchIndex["portmidi"] = {"doc":"","items":[[3,"DeviceInfo","portmidi","Represents a PortMidi device.",null,null],[3,"InputPort","","Represents the input port of a PortMidi device.",null,null],[3,"OutputPort","","Represents the output port of a PortMidi device.",null,null],[3,"PortMidi","","The PortMidi base struct.\nInitializes PortMidi on creation and terminates it on drop.",null,null],[4,"Direction","","Device event direction.",null,null],[13,"Input","","",0,null],[13,"Output","","",0,null],[4,"PmError","","",null,null],[13,"PmNoError","",""no error" return that also indicates data available",1,null],[13,"PmGotData","",""no error" return that also indicates data available",1,null],[13,"PmHostError","","",1,null],[13,"PmInvalidDeviceId","","out of range or\noutput device when input is requested or\ninput device when output is requested or\ndevice is already opened",1,null],[13,"PmInsufficientMemory","","",1,null],[13,"PmBufferTooSmall","","",1,null],[13,"PmBufferOverflow","","",1,null],[13,"PmBadPtr","","PortMidiStream parameter is NULL or\nstream is not opened or\nstream is output when input is required or\nstream is input when output is required",1,null],[13,"PmBadData","","illegal midi data, e.g. missing EOX",1,null],[13,"PmInternalError","","",1,null],[13,"PmBufferMaxSize","","buffer is already as large as it can be",1,null],[11,"eq","","",1,null],[11,"clone","","",1,null],[11,"fmt","","",1,null],[11,"fmt","","",1,null],[11,"eq","","",0,null],[11,"clone","","",0,null],[11,"fmt","","",0,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"new","","Creates a new `DeviceInfo` instance for the given device id.\nReturns an `Error::PortMidi(_)` if the given id is invalid.",2,{"inputs":[{"name":"portmidideviceid"}],"output":{"name":"result"}}],[11,"is_input","","Returns `true` for an input device.",2,null],[11,"is_output","","Returns `true` for an output device.",2,null],[11,"name","","Returns the device name.",2,null],[11,"direction","","Returns the device event direction.",2,null],[11,"id","","Returns the device id.",2,null],[11,"fmt","","",2,null],[11,"new","","Construct a new `InputPort` for the given device and buffer size.",3,{"inputs":[{"name":"deviceinfo"},{"name":"usize"}],"output":{"name":"result"}}],[11,"read_n","","Returns a `Vec<MidiEvent>` with at most `cnt` elements.\nIf there was no Midi event available, `None` is returned.\nIf PortMidi fails to read from the device an `Error::PortMidi(_)` is returned.",3,null],[11,"read","","Reads a single `MidiEvent` if one is avaible.",3,null],[11,"poll","","Polls for available Midi events.\nReturns `true` if there are events available, otherwise `false` is returned.\nIf the polling fails an `Error::PortMidi(_)` is returned.",3,null],[11,"drop","","",3,null],[11,"new","","Construct a new `OutputPort` for the given device and buffer size.",4,{"inputs":[{"name":"deviceinfo"},{"name":"usize"}],"output":{"name":"result"}}],[11,"write_event","","Write a single `MidiEvent`.\nReturns an `Error::PortMidi(_)` if something went wrong.",4,null],[11,"write_events","","Write a buffer of midi events to the output port.\nReturns an `Error::PortMidi(_)` if something went wrong.",4,null],[11,"write_message","","Write a single `MidiMessage`.\nReturns an `Error::PortMidi(_)` if something went wrong.",4,null],[11,"drop","","",4,null],[0,"types","","",null,null],[3,"MidiMessage","portmidi::types","Represents a Midi message.",null,null],[12,"status","","",5,null],[12,"data1","","",5,null],[12,"data2","","",5,null],[3,"MidiEvent","","Represents a time stamped midi event. See also `MidiMessage`",null,null],[12,"message","","",6,null],[12,"timestamp","","",6,null],[4,"Error","","PortMidi error type.",null,null],[13,"PortMidi","","",7,null],[13,"Unknown","","",7,null],[13,"Unimplemented","","",7,null],[13,"NoDefaultDevice","","",7,null],[13,"NotAnInputDevice","","",7,null],[13,"NotAnOutputDevice","","",7,null],[13,"Invalid","","",7,null],[6,"PortMidiDeviceId","","",null,null],[6,"Result","","PortMidi result type.",null,null],[11,"from","","",8,{"inputs":[{"name":"pmerror"}],"output":{"name":"self"}}],[11,"eq","","",7,null],[11,"ne","","",7,null],[11,"fmt","","",7,null],[11,"clone","","",7,null],[11,"from","","",7,{"inputs":[{"name":"pmerror"}],"output":{"name":"self"}}],[11,"fmt","","",7,null],[11,"fmt","","",5,null],[11,"eq","","",5,null],[11,"ne","","",5,null],[11,"clone","","",5,null],[11,"from","","",5,null],[11,"fmt","","",5,null],[11,"from","","",5,{"inputs":[{"name":"i32"}],"output":{"name":"self"}}],[11,"into","","",5,null],[11,"fmt","","",6,null],[11,"eq","","",6,null],[11,"ne","","",6,null],[11,"clone","","",6,null],[11,"from","","",6,{"inputs":[{"name":"pmevent"}],"output":{"name":"self"}}],[11,"from","","",6,{"inputs":[{"name":"midimessage"}],"output":{"name":"self"}}],[11,"into","","",6,null],[11,"new","portmidi","Initializes the underlying PortMidi C library.\nPortMidi does not support *hot plugging*, this means\nthat devices that are connect after calling `new`\nare not picked up.",9,{"inputs":[],"output":{"name":"result"}}],[11,"device_count","","Return the number of devices. This number will not change during the lifetime\nof the program.",9,null],[11,"default_input_device_id","","Returns the `PortMidiDeviceId` for the default input device, or an `Error::NoDefaultDevice` if\nthere is no available.",9,null],[11,"default_output_device_id","","Returns the `PortMidiDeviceId` for the default output device, or an `Error::NoDefaultDevice` if\nthere is no available.",9,null],[11,"device","","Returns the `DeviceInfo` for the given device id or an `Error::PortMidi(_)` if\nthe given id is invalid.",9,null],[11,"devices","","Returns a `Vec<DeviceInfo>` containing all known device infos.\nAn `Error::PortMidi(_)` is returned if the info for a device can't be obtained.",9,null],[11,"default_input_port","","Creates an `InputPort` instance with the given buffer size for the default input device.",9,null],[11,"input_port","","Creates an `InputPort` instance for the given device and buffer size.\nIf the given device is not an input device an `Error::NotAnInputDevice` is returned.",9,null],[11,"default_output_port","","Creates an `OutputPort` instance with the given buffer size for the default output device.",9,null],[11,"output_port","","Creates an `OutputPort` instance for the given device and buffer size.\nIf the given device is not an output device an `Error::NotAnOutputDevice` is returned.",9,null],[11,"drop","","",9,null],[17,"HDRLENGTH","","",null,null],[17,"PM_HOST_ERROR_MSG_LEN","","",null,null]],"paths":[[4,"Direction"],[4,"PmError"],[3,"DeviceInfo"],[3,"InputPort"],[3,"OutputPort"],[3,"MidiMessage"],[3,"MidiEvent"],[4,"Error"],[6,"Result"],[3,"PortMidi"]]}; initSearch(searchIndex);