Tuesday, March 14, 2017

Non GPL libsndfile alternative to read wav files. tinysndfile with Apache License, Version 2.0

A lot of people avoid using GPL in non-free software due to its imposed restrictions. I decided to use libsndfile which is GPL. But many people claim different restrictions as per GPL and i decided to avoid using this library because there were so many conflicting statements that i ended up with no conclusion. I still fear if someone claims for my GPL based projects on PlayStore to provide full source code!. I am not even maintaining many of them. If i am using GPL to process a wav file and i provide enough methods to enhance that GPL part of code why i am forced to provide rest of code?. This way one can even claim whole operating system to become GPL!!!. That's why Android Project decided to go with Apache License.


With above case in mind many developers built software with simpler licenses not imposing loads of terms and conditions. tinysndfile is such alternative to libsndfile. This library is available here https://android.googlesource.com/platform/system/media/+/master/audio_utils. tinysndfile is Android only and requires some editing to make it work on *NIX. I have done that work and stripped audio_utils to extract out tinysndfile. Using this library wav file can be read to get PCM data. It supports common wav files. Whether its a commercial project or a free software use it without fear of any legal issues.



Why tinysndfile?


Look at libsndfile page http://www.mega-nerd.com/libsndfile/ . Below text is read from the same -


"Licensing

libsndfile is released under the terms of the GNU Lesser General Public License, of which there are two versions; version 2.1 and version 3. To maximise the compatibility of libsndfile, the user may choose to use libsndfile under either of the above two licenses. You can also read a simple explanation of the ideas behind the GPL and the LGPL here.

You can use libsndfile with Free Software, Open Source, proprietary, shareware or other closed source applications as long as libsndfile is used as a dynamically loaded library and you abide by a small number of other conditions (read the LGPL for more info). With applications released under the GNU GPL you can also use libsndfile statically linked to your application.

I would like to see libsndfile used as widely as possible but I would prefer it if you released software that uses libsndfile as Free Software or Open Source. However, if you put in a great deal of effort building a significant application which simply uses libsndfile for file I/O, then I have no problem with you releasing that as closed source and charging as much money as you want for it as long as you abide by the license."



Small number of other terms are so much that i avoided using it. Such a great software i decide not to use :(. Example of such other terms are -


https://www.gnu.org/licenses/why-not-lgpl.en.html


https://source.android.com/source/licenses.html#why-apache-software-license



Don't forget to read the GPL section -

http://www.cgal.org/license.html




Download links:

You can download my non-Android version of tinysndfile from here https://github.com/bindeshkumarsingh/android-native-libs/blob/master/tinysndfile-src-nix.7z

No comments: