Re: [fluid-dev] Auto-connect ALSA MIDI input patch

2016-05-05 Thread R.L. Horn
On Tue, 3 May 2016, Tommaso Cucinotta wrote: I kept the alloca() for now, I can change it to using FLUID_MALLOC() and FLUID_MEMSET, No need for that. AFAIK, there's an ALSA malloc() function corresponding to every alloca() macro. I don't know why they're not used more often, unless it's

Re: [fluid-dev] Auto-connect ALSA MIDI input patch

2016-05-04 Thread Tommaso Cucinotta
Hi, I'd be happy to see this integrated into some future release of fluidsynth if others find it useful, please, let me know if/what I can do, in order to get there. I have also created an associated TT where I attached my current patch: https://sourceforge.net/p/fluidsynth/tickets/158/ Than

Re: [fluid-dev] Auto-connect ALSA MIDI input patch

2016-05-03 Thread Tommaso Cucinotta
Hi RL, thanks for the comments! You can find attached a refined patch, with the meaningless comments removed :-), and the new option disabled by default. I kept the alloca() for now, just as it clears the memory, it seems a common paradigm across alsa utils and tutorials (eg, aconnect.c, where

Re: [fluid-dev] Auto-connect ALSA MIDI input patch

2016-05-02 Thread R.L. Horn
On Mon, 2 May 2016, Tommaso Cucinotta wrote: So I worked out the attached patch that adds a bool setting for auto-connecting ALSA MIDI inputs. This is the dual of the "Auto-connect JACK outputs" already there in fluidsynth/QSynth. Feel free to try out the attached patch, and please, share you

[fluid-dev] Auto-connect ALSA MIDI input patch

2016-05-02 Thread Tommaso Cucinotta
Hi all, first of all, thanks for the effort of all contributors to the excellent fluidsynth+qsynth :-)! While using QSynth+fluidsynth mostly as a hobbist, I came across this need for reconnecting the ALSA MIDI input to QSynth/fluidsynth everytime I restart the engine. So I worked out the attac