at master 959 B view raw
1diff -Naurd PortMidi-0.2.0.0/portmidi/pm_linux/pmlinuxalsa.c PortMidi-0.2.0.0-alsafix/portmidi/pm_linux/pmlinuxalsa.c 2--- PortMidi-0.2.0.0/portmidi/pm_linux/pmlinuxalsa.c 2023-12-13 11:35:12.517413022 +0000 3+++ PortMidi-0.2.0.0-alsafix/portmidi/pm_linux/pmlinuxalsa.c 2023-12-13 11:35:12.565413037 +0000 4@@ -719,6 +719,18 @@ 5 } 6 7 8+static void set_alsa_plugin_path( void ) 9+{ 10+ char *existing; 11+ 12+ existing = getenv("ALSA_PLUGIN_DIR"); 13+ if (NULL != existing) { 14+ return; 15+ } 16+ setenv("ALSA_PLUGIN_DIR", "@alsa_plugin_dir@", 0); 17+} 18+ 19+ 20 PmError pm_linuxalsa_init( void ) 21 { 22 int err; 23@@ -726,6 +738,8 @@ 24 snd_seq_port_info_t *pinfo; 25 unsigned int caps; 26 27+ set_alsa_plugin_path(); 28+ 29 /* Previously, the last parameter was SND_SEQ_NONBLOCK, but this 30 * would cause messages to be dropped if the ALSA buffer fills up. 31 * The correct behavior is for writes to block until there is