Always pass card == 0.
device is a device name. On Linux, it is the ALSA string. On Windows, it is currently ignored, so you should pass "default" or null so when it does get implemented your code won't break.
A destructor is present on this object, but not explicitly documented in the source.
A postblit is present on this object, but not explicitly documented in the source.
For reading midi events from hardware, for example, an electronic piano keyboard attached to the computer.