2
0

embedded_files.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. libsndfile : Embedded Sound Files.
  6. </TITLE>
  7. <META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)">
  8. <META NAME="Description" CONTENT="The libsndfile API.">
  9. <META NAME="Keywords" CONTENT="WAV AIFF AU libsndfile sound audio dsp Linux">
  10. <LINK REL="stylesheet" HREF="libsndfile.css" TYPE="text/css" MEDIA="all">
  11. <LINK REL="stylesheet" HREF="print.css" TYPE="text/css" MEDIA="print">
  12. </HEAD>
  13. <!-- pepper -->
  14. <BODY>
  15. <!-- pepper -->
  16. <H1><B>Embedded Sound Files.</B></H1>
  17. <P>
  18. By using the open SNDFILE with a file descriptor function:
  19. </P>
  20. <!-- pepper -->
  21. <PRE>
  22. SNDFILE* sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;
  23. </PRE>
  24. <!-- pepper -->
  25. <P>
  26. it is possible to open sound files embedded within larger files.
  27. There are however a couple of caveats:
  28. <P>
  29. <!-- pepper -->
  30. <UL>
  31. <LI> Read/Write mode (SFM_RDWR) is not supported.
  32. <LI> Writing of embedded files is only supported at the end of the file.
  33. <LI> Reading of embedded files is only supported at file offsets greater
  34. than zero.
  35. <LI> Not all file formats are supported (currently only WAV, AIFF and AU).
  36. </UL>
  37. <!-- pepper -->
  38. <P>
  39. The test program <B>multi_file_test.c</B> in the <B>tests/</B> directory of the
  40. source code tarball shows how this functionality is used to read and write
  41. embedded files.
  42. </P>
  43. <!-- pepper -->
  44. </BODY>
  45. </HTML>