Difference between revisions of "SoX native intermediate format"

From MultimediaWiki
Jump to navigation Jump to search
m
(clarify header size padding requirement)
Line 23: Line 23:
 
Number of channels must be between 1 and 65535, inclusive.
 
Number of channels must be between 1 and 65535, inclusive.
  
Total header size must be a multiple of 8 bytes; it equals size of the fixed header (without the magic number - 28 bytes) plus size of comment plus size of padding (which is reserved for possible future use).
+
Total header size (including the magic number) must be a multiple of 8 bytes.
 +
 
 +
The coded header size field equals size of the fixed header (without the magic number, i.e. 28 bytes) plus size of comment plus size of padding (which is reserved for possible future use).
  
 
[[Category:Container Formats]]
 
[[Category:Container Formats]]
 
[[Category:Formats missing in FFmpeg]]
 
[[Category:Formats missing in FFmpeg]]

Revision as of 09:56, 28 May 2009

  • Extension: sox

Uncompressed PCM format used in SoX.

SoX has LGPL muxer and demuxer.

File format

Depending on the magic number, all fields are written in big or little endian, including the double-precision floating-point sample rate. Audio is always stored in 32-bit linear PCM, with endianness also determined by the file's magic number.

 Bytes    Type      Description
 
  0- 3    string    Magic number (".SoX" for LE, "XoS." for BE)
  4- 7    int32     Size of headers in bytes
  8-15    int64     Number of samples
 16-23    double    Sample rate
 24-27    int32     Number of channels
 28-31    int32     Size of comment in bytes
 32-..    string    Comment
 ..-..              Padding
 ..-end   int32     Audio samples

Number of channels must be between 1 and 65535, inclusive.

Total header size (including the magic number) must be a multiple of 8 bytes.

The coded header size field equals size of the fixed header (without the magic number, i.e. 28 bytes) plus size of comment plus size of padding (which is reserved for possible future use).