audiolib: Import ALSA MIDI support from JFAudioLib and patch through the menu system as appropriate.
As discussed on Discord, as a side project I bought over the ALSA MIDI code from JFAudioLib for EDuke32. I've been using Linux a lot more and play Duke 3D with actual synths so I missed having this.
Code from JFAudioLib came through with minimal fuss, but did require some changes. Once bought in, I found the code was hard-coded to a Client/Port ID of 128:0. It's a bit clunky, but I've put sliders in to allow the end-user to adjust the client and port IDs as appropriate.
It'd probably be better that the ALSA code be extended to properly enumerate the MIDI devices the system has (basically the output of aplaymidi -l
) and present the returned output as options for the user. That'll probably be something for another time, though.
Edited by Mitchell Richters