fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: R.L. Horn
Subject: Re: [fluid-dev] Auto-connect ALSA MIDI input patch
Date: Mon, 2 May 2016 18:42:07 -0500 (CDT)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

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 your comments/thoughts!

I've only glanced over it, but the alloca()s and assert()s jumped right out. The X != NULL assertion is pretty much meaningless after an alloca() and it looks like NDEBUG is normally defined anyway.

Besides, there's no good reason to use alloca() there (there are very few good reasons for using alloca() generally), especially as you've already seen to freeing the variables (and commenting it out because, of course, it segfaults). Use the corresponding malloc() functions instead. And tedious old conditionals to check the return values.

Other than that, it looks fairly sound.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]