7

Can the Libsndfile C library be used on the iPhone operating system? If so, do I need to just 'include' it, or is it more complicated then that.

Thanks!

Matt K
  • 13,370
  • 2
  • 32
  • 51
Eric Brotto
  • 53,471
  • 32
  • 129
  • 174

2 Answers2

12

I'm the main maintainer of libsndfile.

libsndfile can be compiled and runs quite happily on Debian/Arm and also Android.

I would be surprised if no one has compiled it for iOS, but there are licensing issues. As you are no doubt aware, libsndfile is released under the LGPL which requires that one of the following conditions be met:

a) The library is used as a dynamically linked library (DLL on windows, shared object on Linux, dynlib on OSX etc).

b) All code that statically links to the LGPL library is released under a LGPL compatible license.

c) The library is used as a static library, but that all object files required to link the library against a new version be made available to all recipients of the application.

As I understand it, iOS does not support dynamically linked libraries (Android does) so option a) is out. That leaves you with options b) and c).

If you decide to go with option b) or c) then you still need to compile the library (and possibly it optional dependencies) for iOS and then link the library against your code.

  • 6
    Condition B is the top reason I **hate** LGPL. –  Mar 08 '11 at 15:15
  • 9
    Good for you. You can choose not to use LGPL licensed software. Even better, you can write software that competes with the LGPL licensed stuff and release it under whatever license you like. – Erik de Castro Lopo Apr 01 '11 at 02:25
  • Would you consider allowing static linking for iOS apps, like the author of SoundTouch has? http://www.surina.net/soundtouch/faq.html#license – Nick Dowell Aug 14 '11 at 12:54
  • I could if I was the sole copyright holder. Unfortunately libsndfile has lots of copyright holders and I simply don't have the patience to track them all down and ask them if its ok. – Erik de Castro Lopo Aug 27 '11 at 09:51
  • Are static libraries for Android available/can be created? – Valgrind1691 Nov 21 '18 at 08:10
0

You can find the sndfile.framework libsndfile wrapper inside this dependencies tar.gz

http://files.sbooth.org/SFBAudioEngine-dependencies.tar.bz2

loretoparisi
  • 15,724
  • 11
  • 102
  • 146