Build 9214
GIT-
Don't try to open device if it isn't in
Show details
the list as returned by ALSADrv_MIDI_ListPorts. Opening a device with ALSA_PortID == 0 might technically be successful even if not present.
-
General
Audio / Duke3D: Modify alsa_mididevinfo_t to manage memory use of
Show details
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.
-
General
ALSA MIDI: Improve implementation as per discussions in terminx/eduke32!16.
Show details
* 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.
-
Do free driver name strings duplicated using Xstrdup
-
Refuse to initialize if Client:Port pair isn't in the list