commit c297a7f84432940c28aa9af76f417b6ccecba27e Author: NY00123 Date: Thu Aug 6 23:05:41 2020 +0300 ALSADrv_MIDI_Init: Don't try to open device if it isn't in the list as returned by ALSADrv_MIDI_ListPorts. Opening a device with ALSA_PortID == 0 might technically be successful even if not present. commit 7c1c12bf9c47fd391f28a9e270dce760ffc14364 Author: NY00123 Date: Tue Jun 23 22:11:24 2020 +0300 Audio / Duke3D: Modify alsa_mididevinfo_t to manage memory use of the "name" field on its own. Also make sure that the for loop in Menu_RefreshSoundProperties isn't accessing copies of the objects, including temporary copies of the "name" strings. It could be managed in a better way, but this should be usable for now. commit b1cfcd43592d257ca1cd3d07ccc1d96806b6d9d7 Author: Mitchell Richters Date: Sat Jun 20 20:30:11 2020 +1000 ALSA MIDI: Improve implementation as per discussions in terminx/eduke32!16. * Don't call ALSADrv_MIDI_ListPorts() from driver_alsa.cpp. There is no need to do this as ALSADrv_MIDI_Init() just connects to the client and port specified and succeeds or fails accordingly. * Remove nullDevice vector from driver_alsa.cpp. Calculate whether returned vector from ALSADrv_MIDI_ListPorts() is null or not within game's menu and handle accordingly. * Remove static declaration of validDevices from driver_alsa.cpp. Vector is of no use inside of driver_alsa.cpp and is only required game-side. * Return declaration of devices found back to ALSADrv_MIDI_ListPorts() and return whether it's empty or not. * Declare alsadevices as an empty non-constant in menus.cpp, then populate from Menu_RefreshSoundProperties() in menus.cpp. This allows us to fill alsadevices with an empty vector if no devices found and allows a user to plug new MIDI devices in and have the game find them without restarting the game. commit 69c9d0b5e8ad5725da7e02980c06a296aec9934b Author: NY00123 Date: Sat May 30 15:01:12 2020 +0300 ALSADrv_MIDI_Shutdown: Do free driver name strings duplicated using Xstrdup commit dc22897f513fc97d797f4b379e3b4ceccc522f79 Author: NY00123 Date: Sat May 30 15:00:42 2020 +0300 ALSADrv_MIDI_Init: Refuse to initialize if Client:Port pair isn't in the list commit f13fbf66e3187d95ea7c0b7fd91f04032442bbfd Author: NY00123 Date: Sat May 30 14:58:33 2020 +0300 Duke3D: Fix potential crashes in menu if no ALSA MIDI device is found See https://voidpoint.io/terminx/eduke32 for more details.