SoX native intermediate format
Jump to navigation Jump to search
- Extension: sox
Uncompressed PCM format used in SoX.
SoX has LGPL muxer and demuxer.
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).