File: embedded_files.md

package info (click to toggle)
libsndfile 1.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,120 kB
  • sloc: ansic: 55,350; cpp: 1,108; python: 791; makefile: 539; sh: 539; cs: 122
file content (21 lines) | stat: -rw-r--r-- 727 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
layout: page
---

# Embedded Sound Files

By using the open SNDFILE with a file descriptor function:

    SNDFILE*  sf_open_fd (int fd, int mode, SF_INFO *sfinfo, int close_desc) ;

it is possible to open sound files embedded within larger files. There are
however a couple of caveats:

* Read/Write mode (SFM_RDWR) is not supported.
* Writing of embedded files is only supported at the end of the file.
* Reading of embedded files is only supported at file offsets greater than zero.
* Not all file formats are supported (currently only WAV, AIFF and AU).

The test program **multi_file_test.c** in the **tests/** directory of the source
code tarball shows how this functionality is used to read and write embedded
files.