1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
6 libsndfile : Frequently Asked Questions.
8 <META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
9 <META NAME="Description" CONTENT="The libsndfile FAQ.">
10 <META NAME="Keywords" CONTENT="WAV AIFF AU libsndfile sound audio dsp Linux">
11 <LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
12 <LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
17 <H1><B>libsndfile : Frequently Asked Questions.</B></H1>
19 <A HREF="#Q001">Q1 : Do you plan to support XYZ codec in libsndfile?</A><BR>
20 <A HREF="#Q002">Q2 : In version 0 the SF_INFO struct had a pcmbitwidth field
21 but version 1 does not. Why?</A><BR>
22 <A HREF="#Q003">Q3 : Compiling is really slow on MacOS X. Why?</A><BR>
23 <A HREF="#Q004">Q4 : When trying to compile libsndfile on Solaris I get a "bad
24 substitution" error during linking. What can I do to fix this?</A><BR>
25 <A HREF="#Q005">Q5 : Why doesn't libsndfile do interleaving/de-interleaving?</A><BR>
26 <A HREF="#Q006">Q6 : What's the best format for storing temporary files?</A><BR>
27 <A HREF="#Q007">Q7 : On Linux/Unix/MacOS X, what's the best way of detecting the
28 presence of libsndfile?</A><BR>
29 <A HREF="#Q008">Q8 : But I just want a simple Makefile! What do I do?</A><BR>
30 <A HREF="#Q009">Q9 : How about adding the ability to write/read sound files to/from
31 memory buffers?</A><BR>
32 <A HREF="#Q010">Q10 : Reading a 16 bit PCM file as normalised floats and then
33 writing them back changes some sample values. Why?</A><BR>
34 <A HREF="#Q011">Q11 : I'm having problems with u-law encoded WAV files generated by
35 libsndfile in Winamp. Why?</A><BR>
36 <A HREF="#Q012">Q12 : I'm looking at sf_read*. What are items? What are frames?</A><BR>
37 <A HREF="#Q013">Q13 : Why can't libsndfile open this Sound Designer II (SD2)
39 <A HREF="#Q014">Q14 : I'd like to statically link libsndfile to my closed source
40 application. Can I buy a license so that this is possible?</A><BR>
41 <A HREF="#Q015">Q15 : My program is crashing during a call to a function in libsndfile.
42 Is this a bug in libsndfile?</A><BR>
43 <A HREF="#Q016">Q16 : Will you accept a fix for compiling libsndfile with compiler X?
45 <A HREF="#Q017">Q17 : Can libsndfile read/write files from/to UNIX pipes?
47 <A HREF="#Q018">Q18 : Is it possible to build a Universal Binary on Mac OS X?
49 <A HREF="#Q019">Q19 : I have project files for Visual Studio / XCode / Whatever. Why
50 don't you distribute them with libsndfile?
52 <A HREF="#Q020">Q20 : Why doesn't libsndfile support MP3? Lots of other Open Source
55 <A HREF="#Q021">Q21 : How do I use libsndfile in a closed source or commercial program
56 and comply with the license?
58 <A HREF="#Q022">Q22 : What versions of windows does libsndfile work on?
60 <A HREF="#Q023">Q23 : I'm cross compiling libsndfile for another platform. How can I
65 <!-- ========================================================================= -->
67 <H2><BR><B>Q1 : Do you plan to support XYZ codec in libsndfile?</B></H2>
69 If source code for XYZ codec is available under a suitable license (LGPL, BSD,
70 MIT etc) then yes, I'd like to add it.
73 If suitable documentation is available on how to decode and encode the format
74 then maybe, depending on how much work is involved.
77 If XYZ is some proprietary codec where no source code or documentation is
81 So if you want support for XYZ codec, first find existing source code or
83 If you can't find either then the answer is no.
85 <!-- ========================================================================= -->
87 <H2><BR><B>Q2 : In version 0 the SF_INFO struct had a pcmbitwidth field
88 but version 1 does not. Why?</B></H2>
90 This was dropped for a number of reasons:
93 <LI> pcmbitwidth makes little sense on compressed or floating point formats
94 <LI> with the new API you really don't need to know it
98 <A HREF="http://www.mega-nerd.com/libsndfile/api.html#note1">here</A>
99 there is now a well defined behaviour which ensures that no matter what the
100 bit width of the source file, the scaling always does something sensible.
101 This makes it safe to read 8, 16, 24 and 32 bit PCM files using sf_read_short()
102 and always have the optimal behaviour.
105 <!-- ========================================================================= -->
107 <H2><BR><B>Q3 : Compiling is really slow on MacOS X. Why?</B></H2>
109 When you configure and compile libsndfile, it uses the /bin/sh shell for a number
110 of tasks (ie configure script and libtool).
111 Older versions of OS X (10.2?) shipped a really crappy Bourne shell as /bin/sh
112 which resulted in <b>really</b> slow compiles.
113 Newer version of OS X ship GNU Bash as /bin/sh and this answer doesn't apply in that
117 To fix this I suggest that you install the GNU Bash shell, rename /bin/sh to
118 /bin/sh.old and make a symlink from /bin/sh to the bash shell.
119 Bash is designed to behave as a Bourne shell when is is called as /bin/sh.
122 When I did this on my iBook running MacOS X, compile times dropped from 13 minutes
126 <!-- ========================================================================= -->
128 <H2><BR><B>Q4 : When trying to compile libsndfile on Solaris I get a "bad
129 substitution" error on linking. Why?</B></H2>
131 It seems that the Solaris Bourne shell disagrees with GNU libtool.
134 To fix this I suggest that you install the GNU Bash shell, rename /bin/sh to
135 /bin/sh.old and make a symlink from /bin/sh to the bash shell.
136 Bash is designed to behave as a Bourne shell when is is called as /bin/sh.
139 <!-- ========================================================================= -->
141 <H2><BR><B>Q5 : Why doesn't libsndfile do interleaving/de-interleaving?</B></H2>
143 This problem is bigger than it may seem at first.
146 For a stereo file, it is a pretty safe bet that a simple interleaving/de-interleaving
147 could satisfy most users.
148 However, for files with more than 2 channels this is unlikely to be the case.
149 If the user has a 4 channel file and want to play that file on a stereo output
150 sound card they either want the first 2 channels or they want some mixed combination
154 When you add more channels, the combinations grow exponentially and it becomes
155 increasingly difficult to cover even a sensible subset of the possible combinations.
156 On top of that, coding any one style of interleaver/de-interleaver is trivial, while
157 coding one that can cover all combinations is far from trivial.
158 This means that this feature will not be added any time soon.
161 <!-- ========================================================================= -->
163 <H2><BR><B>Q6 : What's the best format for storing temporary files?</B></H2>
166 When you want to store temporary data there are a number of requirements;
169 <LI> A simple, easy to parse header.
170 <LI> The format must provide the fastest possible read and write rates (ie
171 avoid conversions and encoding/decoding).
172 <LI> The file format must be reasonably common and playable by most players.
173 <LI> Able to store data in either endian-ness.
176 The format which best meets these requirements is AU, which allows data to be
177 stored in any one of short, int, float and double (among others) formats.
180 For instance, if an application uses float data internally, its temporary files
181 should use a format of (SF_ENDIAN_CPU | SF_FORMAT_AU | SF_FORMAT_FLOAT) which
182 will store big endian float data in big endian CPUs and little endian float data
183 on little endian CPUs.
184 Reading and writing this format will not require any conversions or byte swapping
185 regardless of the host CPU.
188 <!-- ========================================================================= -->
191 <H2><BR><B>Q7 : On Linux/Unix/MaxOS X, what's the best way of detecting the presence
192 of libsndfile using autoconf?</B></H2>
195 libsndfile uses the pkg-config (man pkg-config) method of registering itself with the
197 The best way of detecting its presence is using something like this in configure.ac
201 PKG_CHECK_MODULES(SNDFILE, sndfile >= 1.0.2, ac_cv_sndfile=1, ac_cv_sndfile=0)
203 AC_DEFINE_UNQUOTED([HAVE_SNDFILE],${ac_cv_sndfile},
204 [Set to 1 if you have libsndfile.])
206 AC_SUBST(SNDFILE_CFLAGS)
207 AC_SUBST(SNDFILE_LIBS)
210 This will automatically set the <B>SNDFILE_CFLAGS</B> and <B>SNDFILE_LIBS</B>
211 variables which can be used in Makefile.am like this:
214 SNDFILE_CFLAGS = @SNDFILE_CFLAGS@
215 SNDFILE_LIBS = @SNDFILE_LIBS@
218 If you install libsndfile from source, you will probably need to set the
219 <B>PKG_CONFIG_PATH</B> environment variable as suggested at the end of the
220 libsndfile configure process. For instance on my system I get this:
223 -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=-
225 Configuration summary :
227 Version : ..................... 1.0.5
228 Experimental code : ........... no
232 Compiler is GCC : ............. yes
233 GCC major version : ........... 3
235 Installation directories :
237 Library directory : ........... /usr/local/lib
238 Program directory : ........... /usr/local/bin
239 Pkgconfig directory : ......... /usr/local/lib/pkgconfig
241 Compiling some other packages against libsndfile may require
242 the addition of "/usr/local/lib/pkgconfig" to the
243 PKG_CONFIG_PATH environment variable.
246 <!-- ========================================================================= -->
249 <H2><BR><B>Q8 : But I just want a simple Makefile! What do I do?</B></H2>
252 The <B>pkg-config</B> program makes finding the correct compiler flag values and
253 library location far easier.
254 During the installation of libsndfile, a file named <B>sndfile.pc</B> is installed
255 in the directory <B>${libdir}/pkgconfig</B> (ie if libsndfile is installed in
256 <B>/usr/local/lib</B>, <B>sndfile.pc</B> will be installed in
257 <B>/usr/local/lib/pkgconfig/</B>).
260 In order for pkg-config to find sndfile.pc it may be necessary to point the
261 environment variable <B>PKG_CONFIG_PATH</B> in the right direction.
264 export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
268 Then, to compile a C file into an object file, the command would be:
271 gcc `pkg-config --cflags sndfile` -c somefile.c
274 and to link a number of objects into an executable that links against libsndfile,
275 the command would be:
278 gcc `pkg-config --libs sndfile` obj1.o obj2.o -o program
281 <!-- ========================================================================= -->
284 <H2><BR><B>Q9 : How about adding the ability to write/read sound files to/from
285 memory buffers?</B></H2>
288 This has been added for version 1.0.13.
291 <!-- ========================================================================= -->
294 <H2><BR><B>Q10 : Reading a 16 bit PCM file as normalised floats and then
295 writing them back changes some sample values. Why?</B></H2>
298 This is caused by the fact that the conversion from 16 bit short to float is
299 done by dividing by 32768 (0x8000 in hexadecimal) while the conversion from
300 float to 16 bit short is done by multiplying by 32767 (0x7FFF in hex).
301 So for instance, a value in a 16 bit PCM file of 20000 gets read as a floating
302 point number of 0.6103515625 (20000.0 / 0x8000).
303 Converting that back to a 16 bit short results in a value of 19999.3896484375
304 (0.6103515625 * 0x7FFF) which then gets rounded down to 19999.
307 You will notice that for this particular case, the error is 1 in 20000 or
309 Interestingly, for values of less than 16369, dividing by 0x8000 followed
310 by multiplying by 0x7FFF and then rounding the result, gives back the
312 It turns out that as long as the host operating system supplies the 1999 ISO
313 C Standard functions <B>lrintf</B> and <B>lrint</B> (or a replacement has
314 been supplied) then the maximum possible error is 1 in 16369 or about 0.006%.
317 Regardless of the size of the error, the reason why this is done is rather
321 In a file containing 16 bit PCM samples, the values are restricted to the range
322 [-32768, 32767] while we want floating point values in the range [-1.0, 1.0].
323 The only way to do this conversion is to do a floating point division by a value
325 Converting the other way, the only way to ensure that floating point values in
326 the range [-1.0, 1.0] are within the valid range allowed by a 16 bit short is
327 to multiply by 0x7FFF.
330 Some people would say that this is a severe short-coming of libsndfile.
331 I would counter that anybody who is constantly converting back and forth
332 between 16 bit shorts and normalised floats is going to suffer other losses
333 in audio quality that they should also be concerned about.
336 Since this problem only occurs when converting between integer data on disk and
337 normalized floats in the application, it can be avoided by using something
338 other than normalized floats in the application.
339 Alternatives to normalized floats are the <b>short</b> and <b>int</b> data
340 types (ie using sf_read_short or sf_read_int) or using un-normalized floats
342 <a href="http://www.mega-nerd.com/libsndfile/command.html#SFC_SET_NORM_FLOAT">
343 SFC_SET_NORM_FLOAT</a>).
346 Another way to deal with this problem is to consider 16 bit short data as a
347 final destination format only, not as an intermediate storage format.
348 All intermediate data (ie which is going to be processed further) should be
349 stored in floating point format which is supported by all of the most common
351 If floating point files are considered too large (2 times the size of a 16 bit
352 PCM file), it would also be possible to use 24 bit PCM as an intermediate
353 storage format (and which is also supported by most common file types).
356 <!-- ========================================================================= -->
359 <H2><BR><B>Q11 : I'm having problems with u-law encoded WAV files generated by
360 libsndfile in Winamp. Why?
364 This is actually a Winamp problem.
365 The official Microsoft spec suggests that the 'fmt ' chunk should be 18 bytes.
366 Unfortunately at least one of Microsoft's own applications (Sound Recorder on
367 Win98 I believe) did not accept 18 bytes 'fmt ' chunks.
370 Michael Lee did some experimenting and found that:
373 I have checked that Windows Media Player 9, QuickTime Player 6.4,
374 RealOne Player 2.0 and GoldWave 5.06 can all play u-law files with
375 16-byte or 18-byte 'fmt ' chunk. Only Winamp (2.91) and foobar2000
376 are unable to play u-law files with 16-byte 'fmt ' chunk.
380 Even this is a very small sampling of all the players out there.
381 For that reason it is probably not a good idea to change this now because there
382 is the risk of breaking something that currently works.
385 <!-- ========================================================================= -->
388 <H2><BR><B>Q12 : I'm looking at sf_read*. What are items? What are frames?
392 For a sound file with only one channel, a frame is the same as a item.
395 For multi channel sound files, a single frame contains a single item for
399 <!-- ========================================================================= -->
402 <H2><BR><B>Q13 : Why can't libsndfile open this Sound Designer II (SD2) file?
406 This is somewhat complicated.
407 First some background.
411 SD2 files are native to the Apple Macintosh platform and use features of
412 the Mac filesystem (file resource forks) to store the file's sample rate,
413 number of channels, sample width and more.
414 When you look at a file and its resource fork on Mac OS X it looks like
419 -rw-r--r-- 1 erikd erikd 46512 Oct 18 22:57 file.sd2
420 -rw-r--r-- 1 erikd erikd 538 Oct 18 22:57 file.sd2/rsrc
424 Notice how the file itself looks like a directory containing a single file
426 When libsndfile is compiled for MacOS X, it should open (for write and read)
427 SD2 file with resource forks like this without any problems.
428 It will also handle files with the resource fork in a separate file as
433 When SD2 files are moved to other platforms, the resource fork of the file
434 can sometimes be dropped altogether.
435 All that remains is the raw audio data and no information about the number
436 of channels, sample rate or bit width which makes it a little difficult for
437 libsndfile to open the file.
441 However, it is possible to safely move an SD2 file to a Linux or Windows
443 For instance, when an SD2 file is copied from inside MacOS X to a windows
444 shared directory or a Samba share (ie Linux), MacOS X is clever enough to
445 store the resource fork of the file in a separate hidden file in the
446 same directory like this:
449 -rw-r--r-- 1 erikd erikd 538 Oct 18 22:57 ._file.sd2
450 -rw-r--r-- 1 erikd erikd 46512 Oct 18 22:57 file.sd2
454 Regardless of what platform it is running on, when libsndfile is asked to
455 open a file named <B>"foo"</B> and it can't recognize the file type from
456 the data in the file, it will attempt to open the resource fork and if
457 that fails, it then tries to open a file named <B>"._foo"</B> to see if
458 the file has a valid resource fork.
459 This is the same regardless of whether the file is being opened for read
464 In short, libsndfile should open SD2 files with a valid resource fork on
465 all of the platforms that libsndfile supports.
466 If a file has lost its resource fork, the only option is the open the file
467 using the SF_FORMAT_RAW option and guessing its sample rate, channel count
472 Occasionally, when SD2 files are moved to other systems, the file is
473 <A HREF="http://www.macdisk.com/binhexen.php3">BinHexed</A>
474 which wraps the resource fork and the data fork together.
475 For these files, it would be possible to write a BinHex parser but
476 there is not a lot to gain considering how rare these BinHexed SD2
480 <!-- ========================================================================= -->
482 <H2><BR><B>Q14 : I'd like to statically link libsndfile to my closed source
483 application. Can I buy a license so that this is possible?
488 libsndfile contains code written by other people who have agreed that their
489 code be used under the GNU LGPL but no more.
490 Even if they were to agree, there would be significant difficulties in
491 dividing up the payments fairly.
495 The <B>only</B> way you can legally use libsndfile as a statically linked
496 library is if your application is released under the GNU GPL or LGPL.
499 <!-- ========================================================================= -->
501 <H2><BR><B>Q15 : My program is crashing during a call to a function in libsndfile.
502 Is this a bug in libsndfile?
506 libsndfile is being used by large numbers of people all over the world
507 without any problems like this. That means that it is much more likely
508 that your code has a bug than libsndfile. However, it is still possible
509 that there is a bug in libsndfile.
512 To figure out whether it is your code or libsndfile you should do the
516 <LI>Make sure you are compiling your code with warnings switched on and
517 that you fix as many warnings as possible.
518 With the GNU compiler (gcc) I would recommend at least
519 <B>-W -Wall -Werror</B> which will force you to fix all warnings
520 before you can run the code.
521 <LI>Try using a memory debugger.
522 <A HREF="http://valgrind.kde.org/">Valgrind</A> on x86 Linux is excellent.
523 <A HREF="http://www.ibm.com/software/awdtools/purify/">Purify</A> also
524 has a good reputation.
525 <LI>If the code is clean after the above two steps and you still get
526 a crash in libsndfile, then send me a small snippet of code (no
527 more than 30-40 lines) which includes the call to sf_open() and
528 also shows how all variables passed to/returned from sf_open()
532 <!-- ========================================================================= -->
534 <H2><BR><B>Q16 : Will you accept a fix for compiling libsndfile with compiler X?
538 If compiler X is a C++ compiler then no.
539 C and C++ are different enough to make writing code that compiles as valid C
540 and valid C++ too difficult.
541 I would rather spend my time fixing bugs and adding features.
545 If compiler X is a C compiler then I will do what I can as long as that does
546 not hamper the correctness, portability and maintainability of the existing
548 It should be noted however that libsndfile uses features specified by the 1999
550 This can make compiling libsndfile with some older compilers difficult.
553 <!-- ========================================================================= -->
555 <H2><BR><B>Q17 : Can libsndfile read/write files from/to UNIX pipes?
559 Yes, libsndfile can read files from pipes.
560 Unfortunately, the write case is much more complicated.
564 File formats like AIFF and WAV have information at the start of the file (the
565 file header) which states the length of the file, the number of sample frames
567 This information must be filled in correctly when the file header is written,
568 but this information is not reliably known until the file is closed.
569 This means that libsndfile cannot write AIFF, WAV and many other file types
574 However, there is at least one file format (AU) which is specifically designed
575 to be written to a pipe.
576 Like AIFF and WAV, AU has a header with a sample frames field, but it is
577 specifically allowable to set that frames field to 0x7FFFFFFF if the file
578 length is not known when the header is written.
579 The AU file format can also hold data in many of the standard formats (ie
580 SF_FORMAT_PCM_16, SF_FORMAT_PCM_24, SF_FORMAT_FLOAT etc) as well as allowing
581 data in both big and little endian format.
585 See also <A HREF="#Q006">FAQ Q6</A>.
588 <!-- ========================================================================= -->
590 <H2><BR><B>Q18 : Is it possible to build a Universal Binary on Mac OS X?
594 Yes, but you must do two separate configure/build/test runs; one on PowerPC
596 It is then possible to merge the binaries into a single universal binary using
597 one of the programs in the Apple tool chain.
601 It is <b>not</b> possible to build a working universal binary via a single
602 compile/build run on a single CPU.
606 The problem is that the libsndfile build process detects features of the CPU its
607 being built for during the configure process and when building a universal binary,
608 configure is only run once and that data is then used for both CPUs.
609 That configure data will be wrong for one of those CPUs.
610 You will still be able to compile libsndfile, and the test suite will pass on
611 the machine you compiled it on.
612 However, if you take the universal binary test suite programs compiled on one
613 CPU and run them on the other, the test suite will fail.
617 Part of the problem is the the CPU endian-ness is detected at configure time.
618 Yes, I know the Apple compiler defines one of the macros __LITTLE_ENDIAN__
619 and __BIG_ENDIAN__, but those macros are not part of the 1999 ISO C Standard
620 and they are not portable.
624 Endian issues are not the only reason why the cross compiled binary will fail.
625 The configure script also detects other CPU specific idiosyncrasies to provide
630 Finally, the real show stopper problem with universal binaries is the problem
632 libsndfile contains a huge, comprehensive test suite.
633 When you compile a universal binary and run the test suite, you only test the
635 The cross compiled binary (the one with the much higher chance of having
636 problems) cannot be tested.
640 Now, if you have read this far you're probably thinking there must be a way
641 to fix this and there probably is.
642 The problem is that its a hell of a lot of work and would require significant
643 changes to the configure process, the internal code and the test suite.
644 In addition, these changes must not break compilation on any of the platforms
645 libsndfile is currently working on.
649 <!-- ========================================================================= -->
651 <H2><BR><B>Q19 : I have project files for Visual Studio / XCode / Whatever. Why
652 don't you distribute them with libsndfile?
656 There's a very good reason for this.
657 I will only distribute things that I actually have an ability to test and
659 Project files for a bunch of different compilers and Integrated Development
660 Environments are simply too difficult to maintain.
664 The problem is that every time I add a new file to libsndfile or rename an
665 existing file I would have to modify all the project files and then test that
666 libsndfile still built with all the different compilers.
670 Maintaining these project files is also rather difficult if I don't have access
671 to the required compiler/IDE.
672 If I just edit the project files without testing them I will almost certainly
674 If I release a version of libsndfile with broken project files, I'll get a bunch
675 of emails from people complaining about it not building and have no way of
676 fixing or even testing it.
680 I currently release sources that I personally test on Win32, Linux and
681 MacOS X (PowerPC) using the compiler I trust (GNU GCC).
682 Supporting one compiler on three (actually much more because GCC is available
683 almost everywhere) platforms is doable without too much pain.
684 I also release binaries for Win32 with instructions on how to use those
685 binaries with Visual Studio.
686 As a guy who is mainly interested in Linux, I'm not to keen to jump through
687 a bunch of hoops to support compilers and operating systems I don't use.
691 So, I hear you want to volunteer to maintain the project files for Some Crappy
693 Well sorry, that won't work either.
694 I have had numerous people over the years offer to maintaining the project
695 files for Microsoft's Visual Studio.
696 Every single time that happened, they maintained it for a release or two and
697 then disappeared off the face of the earth.
698 Hence, I'm not willing to enter into an arrangement like that again.
701 <!-- ========================================================================= -->
703 <H2><BR><B>Q20 : Why doesn't libsndfile support MP3? Lots of other Open Source
708 MP3 is not supported for one very good reason; doing so requires the payment
711 <a href="http://www.mp3licensing.com/royalty/software.html">
713 the required royalty payments are not cheap.
717 Yes, I know other libraries ignore the licensing requirements, but their legal
718 status is extremely dubious.
719 At any time, the body selling the licenses could go after the authors of those
721 Some of those authors may be students and hence wouldn't be worth pursuing.
725 However, libsndfile is released under the name of a company, Mega Nerd Pty Ltd;
726 a company which has income from from libsamplerate licensing, libsndfile based
727 consulting income and other unrelated consulting income.
728 Adding MP3 support to libsndfile could place that income would be under legal
733 Fortunately, Ogg Vorbis exists as an alternative to MP3.
734 Support for Ogg Vorbis was added to libsndfile (mostly due to the efforts of
735 John ffitch of the Csound project) in version 1.0.18.
739 <!-- ========================================================================= -->
741 <H2><BR><B>Q21 : How do I use libsndfile in a closed source or commercial program
742 and comply with the license?
746 Here is a checklist of things you need to do to make sure your use of libsndfile
747 in a closed source or commercial project complies with the license libsndfile is
748 released under, the GNU Lesser General Public License (LGPL):
752 <li>Make sure you are linking to libsndfile as a shared library (Linux and Unix
753 systems), Dynamic Link Library (Microsoft Windows) or dynlib (Mac OS X).
754 If you are using some other operating system that doesn't allow dynamically
755 linked libraries, you will not be able to use libsndfile unless you release
756 the source code to your program.
757 <li>In the licensing documentation for your program, add a statement that your
758 software depends on libsndfile and that libsndfile is released under the GNU
759 Lesser General Public License, either
760 <a href="http://www.gnu.org/licenses/lgpl-2.1.txt">version 2.1</a>
762 <a href="http://www.gnu.org/licenses/lgpl.txt">version 3</a>.
763 <li>Include the text for both versions of the license, possibly as separate
764 files named libsndfile_lgpl_v2_1.txt and libsndfile_lgpl_v3.txt.
767 <!-- ========================================================================= -->
769 <H2><BR><B>Q22 : What versions of Windows does libsndfile work on?
773 Currently the precompiled windows binaries are thoroughly tested on Windows XP.
774 As such, they should also work on Win2k and Windows Vista.
775 They may also work on earlier versions of Windows.
779 Since version 0.1.18 I have also been releasing precompiled binaries for Win64,
780 the 64 bit version of Windows.
781 These binaries have received much less testing than the 32 bit versions, but
782 should work as expected.
783 I'd be very interested in receiving feedback on these binaries.
786 <!-- ========================================================================= -->
788 <H2><BR><B>Q23 : I'm cross compiling libsndfile for another platform. How can I
796 Since version 1.0.21 the top level Makefile has an extra make target,
798 Building this target creates a tarball called called:
802 libsndfile-testsuite-${host_triplet}-${version}.tar.gz
806 in the top level directory.
807 This tarball can then be copied to the target platform.
808 Once untarred and test script <tt>test_wrapper.sh</tt> can be run from
809 the top level of the extracted tarball.
812 <!-- ========================================================================= -->
815 The libsndfile home page is here :
816 <A HREF="http://www.mega-nerd.com/libsndfile/">
817 http://www.mega-nerd.com/libsndfile/</A>.