On Mon, 2010-02-01 at 11:53 +1100, Erik de Castro Lopo wrote:
Sure! As long as its LGPL compatible code and not your pipe/dup2/execve
hack :-).
While that is undeniably a hack of the first order, it does hide a
certain truth in that a lot of the lossy audio codecs out there have a
bit of a reputation for memory leaks, and doing the job in a child
process takes care of that matter rather neatly.
In fact the background file converter daemon I am writing at the moment
does a fork and exec for every conversion precisely to insulate from
possible memory leaks in client libraries used by libsndfile (can you
swear that the ogg and flac libraries don't have leaks?), it is just
defensive programming......
But yea, code for libsndfile would need to be something much cleaner
then shelling out to twolame.
Regards, Dan.