ALSA Got one or two examples from here https://ccrma.stanford.edu/~craig/articles/linuxmidi/alsa-1.0/nonblockinginput.c