Reference

snd_rawmidi_transmit_empty(9) on Linux

The text fb7161ab3603, as Debian 8 (Jessie) shipped it.

check whether the output buffer is empty

snd_rawmidi_transmit_empty(9) on Linux now