Updating osxbuild to work with OS X 10.7+/XCode 4.x.
[sox/ew.git] / soxformat.7
blob6ce516b132cf363654a74380c08b80814d5c1e72
1 '\" t
2 '\" The line above instructs most `man' programs to invoke tbl
3 '\"
4 '\" Separate paragraphs; not the same as PP which resets indent level.
5 .de SP
6 .if t .sp .5
7 .if n .sp
8 ..
9 '\"
10 '\" Replacement em-dash for nroff (default is too short).
11 .ie n .ds m " - 
12 .el .ds m \(em
13 '\"
14 '\" Placeholder macro for if longer nroff arrow is needed.
15 .ds RA \(->
16 '\"
17 '\" Decimal point set slightly raised
18 .if t .ds d \v'-.15m'.\v'+.15m'
19 .if n .ds d .
20 '\"
21 '\" Enclosure macro for examples
22 .de EX
23 .SP
24 .nf
25 .ft CW
27 .de EE
28 .ft R
29 .SP
30 .fi
32 .TH SoX 7 "February 19, 2011" "soxformat" "Sound eXchange"
33 .SH NAME
34 SoX \- Sound eXchange, the Swiss Army knife of audio manipulation
35 .SH DESCRIPTION
36 This manual describes SoX supported file formats and audio device types;
37 the SoX manual set starts with
38 .BR sox (1).
39 .SP
40 Format types that can SoX can determine by a filename
41 extension are listed with their names preceded by a dot.
42 Format types that are optionally built into SoX
43 are marked `(optional)'.
44 .SP
45 Format types that can be handled by an
46 external library via an optional pseudo file type (currently
47 .B sndfile
49 .BR ffmpeg )
50 are marked e.g. `(also with \fB\-t sndfile\fR)'.  This might be
51 useful if you have a file that doesn't work with SoX's default format
52 readers and writers, and there's an external reader or writer for that
53 format.
54 .SP
55 To see if SoX has support for an optional format or device, enter
56 .B sox \-h
57 and look for its name under the list:
58 `AUDIO FILE FORMATS' or `AUDIO DEVICE DRIVERS'.
59 .SS SOX FORMATS & DEVICE DRIVERS
60 \&\fB.raw\fR (also with \fB\-t sndfile\fR),
61 \&\fB.f32\fR, \fB.f64\fR,
62 \&\fB.s8\fR, \fB.s16\fR, \fB.s24\fR, \fB.s32\fR,
63 .br
64 \&\fB.u8\fR, \fB.u16\fR, \fB.u24\fR, \fB.u32\fR,
65 \&\fB.ul\fR, \fB.al\fR, \fB.lu\fR, \fB.la\fR
66 .if t .sp -.5
67 .if n .sp -1
68 .TP
69
70 Raw (headerless) audio files.  For
71 .BR raw ,
72 the sample rate and the data encoding must be given using command-line
73 format options; for the other listed types, the sample rate defaults to
74 8kHz (but may be overridden), and the data encoding is defined by the
75 given suffix.  Thus \fBf32\fR and \fBf64\fR indicate files encoded as 32
76 and 64-bit (IEEE single and double precision) floating point PCM
77 respectively; \fBs8\fR, \fBs16\fR, \fBs24\fR, and \fBs32\fR indicate 8,
78 16, 24, and 32-bit signed integer PCM respectively; \fBu8\fR, \fBu16\fR,
79 \fBu24\fR, and \fBu32\fR indicate 8, 16, 24, and 32-bit unsigned integer
80 PCM respectively; \fBul\fR indicates `\(*m-law' (8-bit), \fBal\fR
81 indicates `A-law' (8-bit), and \fBlu\fR and \fBla\fR are inverse bit
82 order `\(*m-law' and inverse bit order `A-law' respectively.  For all raw
83 formats, the number of channels defaults to 1 (but may be overridden).
84 .SP
85 Headerless audio files on a SPARC computer are likely to be of format
86 \fBul\fR;  on a Mac, they're likely to be \fBu8\fR but with a
87 sample rate of 11025 or 22050\ Hz.
88 .SP
89 See
90 .B .ima
91 and
92 .B .vox
93 for raw ADPCM formats, and
94 .B .cdda
95 for raw CD digital audio.
96 .PP
97 \&\fB.f4\fR, \fB.f8\fR,
98 \&\fB.s1\fR, \fB.s2\fR, \fB.s3\fR, \fB.s4\fR,
99 .br
100 \&\fB.u1\fR, \fB.u2\fR, \fB.u3\fR, \fB.u4\fR,
101 \&\fB.sb\fR, \fB.sw\fR, \fB.sl\fR, \fB.ub\fR, \fB.uw\fR
102 .if t .sp -.5
103 .if n .sp -1
106 Deprecated aliases for
107 \fBf32\fR, \fBf64\fR, \fBs8\fR, \fBs16\fR, \fBs24\fR, \fBs32\fR,
109 \fBu8\fR, \fBu16\fR, \fBu24\fR, \fBu32\fR,
110 \fBs8\fR, \fBs16\fR, \fBs32\fR, \fBu8\fR, and \fBu16\fR
111 respectively.
113 \&\fB.8svx\fR (also with \fB\-t sndfile\fR)
114 Amiga 8SVX musical instrument description format.
116 \&\fB.aiff\fR, \fB.aif\fR (also with \fB\-t sndfile\fR)
117 AIFF files as used on old Apple Macs, Apple IIc/IIgs and SGI.
118 SoX's AIFF support does not include multiple audio chunks,
119 or the 8SVX musical instrument description format.
120 AIFF files are multimedia archives and
121 can have multiple audio and picture chunks\*m
122 you may need a separate archiver to work with them.
123 With Mac OS X, AIFF has been superseded by CAF.
125 \&\fB.aiffc\fR, \fB.aifc\fR (also with \fB\-t sndfile\fR)
126 AIFF-C is a format based on AIFF that was created to allow
127 handling compressed audio.  It can also handle little
128 endian uncompressed linear data that is often referred to
130 .B sowt 
131 encoding.  This encoding has also become the defacto format produced by modern 
132 Macs as well as iTunes on any platform.  AIFF-C files produced 
133 by other applications typically have the file extension .aif and
134 require looking at its header to detect the true format.
135 The 
136 .B sowt
137 encoding is the only encoding that SoX can handle with this format.
139 AIFF-C is defined in DAVIC 1.4 Part 9 Annex B.
140 This format is referred from ARIB STD-B24, which is specified for
141 Japanese data broadcasting.  Any private chunks are not supported.
143 \fBalsa\fR (optional)
144 Advanced Linux Sound Architecture device driver; supports both playing and
145 recording audio.  ALSA is only used in Linux-based operating systems, though
146 these often support OSS (see below) as well.  Examples:
148         sox infile \-t alsa
149         sox infile \-t alsa default
150         sox infile \-t alsa plughw:0,0
151         sox \-2 \-t alsa hw:1 outfile
153 See also
154 .BR play (1),
155 .BR rec (1),
157 .BR sox (1)
158 .BR \-d .
160 .B .amb
161 Ambisonic B-Format: a specialisation of
162 .B .wav
163 with between 3 and 16 channels of audio for use with an Ambisonic decoder.
164 See http://www.ambisonia.com/Members/mleese/file-format-for-b-format for
165 details.  It is up to the user to get the channels together in the right
166 order and at the correct amplitude.
168 \&\fB.amr\-nb\fR (optional)
169 Adaptive Multi Rate\*mNarrow Band speech codec; a lossy format used in 3rd
170 generation mobile telephony and defined in 3GPP TS 26.071 et al.
172 AMR-NB audio has a fixed sampling rate of 8 kHz and supports encoding
173 to the following bit-rates (as selected by the
174 .B \-C
175 option): 0 = 4\*d75 kbit/s, 1 = 5\*d15 kbit/s, 2 = 5\*d9 kbit/s, 3 =
176 6\*d7 kbit/s, 4 = 7\*d4 kbit/s 5 = 7\*d95 kbit/s, 6 = 10\*d2
177 kbit/s, 7 = 12\*d2 kbit/s.
179 \&\fB.amr\-wb\fR (optional)
180 Adaptive Multi Rate\*mWide Band speech codec; a lossy format used in 3rd
181 generation mobile telephony and defined in 3GPP TS 26.171 et al.
183 AMR-WB audio has a fixed sampling rate of 16 kHz and supports encoding
184 to the following bit-rates (as selected by the
185 .B \-C
186 option): 0 = 6\*d6 kbit/s, 1 = 8\*d85 kbit/s, 2 = 12\*d65 kbit/s, 3 =
187 14\*d25 kbit/s, 4 = 15\*d85 kbit/s 5 = 18\*d25 kbit/s, 6 = 19\*d85
188 kbit/s, 7 = 23\*d05 kbit/s, 8 = 23\*d85 kbit/s.
190 \fBao\fR (optional)
191 Xiph.org's Audio Output device driver; works only for playing audio.  It
192 supports a wide range of devices and sound systems\*msee its documentation
193 for the full range.  For the most part, SoX's use of libao cannot be
194 configured directly; instead, libao configuration files must be used.
196 The filename specified is used to determine which libao plugin to
197 use.  Normally, you should specify `default' as the filename.  If that
198 doesn't give the desired behavior then you can specify the short name
199 for a given plugin (such as \fBpulse\fR for pulse audio plugin).
200 Examples:
202         sox infile \-t ao
203         sox infile \-t ao default
204         sox infile \-t ao pulse
206 See also
207 .BR play (1)
209 .BR sox (1)
210 .BR \-d .
212 \&\fB.au\fR, \fB.snd\fR (also with \fB\-t sndfile\fR)
213 Sun Microsystems AU files.
214 There are many types of AU file;
215 DEC has invented its own with a different magic number
216 and byte order.  To write a DEC file, use the
217 .B \-L
218 option with the output file options.
220 Some .au files are known to have invalid AU headers; these
221 are probably original Sun \(*m-law 8000\ Hz files and
222 can be dealt with using the
223 .B .ul
224 format (see below).
226 It is possible to override AU file header information
227 with the
228 .B \-r
230 .B \-c
231 options, in which case SoX will issue a warning to that effect.
233 .B .avr
234 Audio Visual Research format;
235 used by a number of commercial packages
236 on the Mac.
238 \&\fB.caf\fR (optional)
239 Apple's Core Audio File format.
241 \&\fB.cdda\fR, \fB.cdr\fR
242 `Red Book' Compact Disc Digital Audio (raw audio).  CDDA has two audio
243 channels formatted as 16-bit signed integers (big endian)at a sample
244 rate of 44\*d1\ kHz.  The number of (stereo) samples in each CDDA
245 track is always a multiple of 588.
247 \fBcoreaudio\fR (optional)
248 Mac OSX CoreAudio device driver: supports both playing and recording
249 audio.  If a filename is not specific or if the name is "default" then
250 the default audio device is selected.  Any other name will be used
251 to select a specific device.  The valid names can be seen in the
252 System Preferences->Sound menu and then under the Output and Input tabs.
254 Examples:
256         sox infile \-t coreaudio
257         sox infile \-t coreaudio default
258         sox infile \-t coreaudio "Internal Speakers"
260 See also
261 .BR play (1),
262 .BR rec (1),
264 .BR sox (1)
265 .BR \-d .
267 \&\fB.cvsd\fR, \fB.cvs\fR
268 Continuously Variable Slope Delta modulation.
269 A headerless format used to compress speech audio for applications such as voice mail.
270 This format is sometimes used with bit-reversed samples\*mthe
271 .B \-X
272 format option can be used to set the bit-order.
274 \&\fB.cvu\fR
275 Continuously Variable Slope Delta modulation (unfiltered).
276 This is an alternative handler for CVSD that is unfiltered but can
277 be used with any bit-rate.  E.g.
279         sox infile outfile.cvu rate 28k
280         play \-r 28k outfile.cvu sinc \-3.4k
283 .B .dat
284 Text Data files.
285 These files contain a textual representation of the
286 sample data.  There is one line at the beginning
287 that contains the sample rate, and one line that
288 contains the number of channels.
289 Subsequent lines contain two or more numeric data intems:
290 the time since the beginning of the first sample and the sample value
291 for each channel.
293 Values are normalized so that the maximum and minimum
294 are 1 and \-1.  This file format can be used to
295 create data files for external programs such as
296 FFT analysers or graph routines.  SoX can also convert
297 a file in this format back into one of the other file
298 formats.
300 Example containing only 2 stereo samples of silence:
303     ; Sample Rate 8012
304     ; Channels 2
305                 0       0       0
306     0.00012481278       0       0
309 \&\fB.dvms\fR, \fB.vms\fR
310 Used in Germany to compress speech audio for voice mail.
311 A self-describing variant of
312 .BR cvsd .
314 \&\fB.fap\fR (optional)
316 .BR .paf .
318 \fBffmpeg\fR (optional)
319 This is a pseudo-type that forces ffmpeg to be used. The actual file
320 type is deduced from the file name (it cannot be used on stdio).
321 It can read a wide range of audio files, not all of which are
322 documented here, and also the audio track of many video files
323 (including AVI, WMV and MPEG). At present only the first audio track
324 of a file can be read.
326 \&\fB.flac\fR (optional; also with \fB\-t sndfile\fR)
327 Xiph.org's Free Lossless Audio CODEC compressed audio.
328 FLAC is an open, patent-free CODEC designed for compressing
329 music.  It is similar to MP3 and Ogg Vorbis, but lossless,
330 meaning that audio is compressed in FLAC without any loss in
331 quality.
333 SoX can read native FLAC files (.flac) but not Ogg FLAC files (.ogg).
334 [But see
335 .B .ogg
336 below for information relating to support for Ogg
337 Vorbis files.]
339 SoX can write native FLAC files according to a given or default
340 compression level.  8 is the default compression level and gives the
341 best (but slowest) compression; 0 gives the least (but fastest)
342 compression.  The compression level is selected using the
343 .B \-C
344 option [see
345 .BR sox (1)]
346 with a whole number from 0 to 8.
348 .B .fssd
349 An alias for the
350 .B .u8
351 format.
353 .B .gsrt
354 Grandstream ring-tone files.
355 Whilst this file format can contain A-Law, \(*m-law, GSM, G.722,
356 G.723, G.726, G.728, or iLBC encoded audio, SoX supports reading and
357 writing only A-Law and \(*m-law.  E.g.
359    sox music.wav \-t gsrt ring.bin
360    play ring.bin
363 \&\fB.gsm\fR (optional; also with \fB\-t sndfile\fR)
364 GSM 06.10 Lossy Speech Compression.
365 A lossy format for compressing speech which is used in the
366 Global Standard for Mobile telecommunications (GSM).  It's good
367 for its purpose, shrinking audio data size, but it will introduce
368 lots of noise when a given audio signal is encoded and decoded
369 multiple times.  This format is used by some voice mail applications.
370 It is rather CPU intensive.
372 .B .hcom
373 Macintosh HCOM files.
374 These are Mac FSSD files with Huffman compression.
376 .B .htk
377 Single channel 16-bit PCM format used by HTK,
378 a toolkit for building Hidden Markov Model speech processing tools.
380 \&\fB.ircam\fR (also with \fB\-t sndfile\fR)
381 Another name for
382 .BR .sf .
384 \&\fB.ima\fR (also with \fB\-t sndfile\fR)
385 A headerless file of IMA ADPCM audio data. IMA ADPCM claims 16-bit precision
386 packed into only 4 bits, but in fact sounds no better than
387 .BR .vox .
389 \&\fB.lpc\fR, \fB.lpc10\fR
390 LPC-10 is a compression scheme for speech developed in the United
391 States. See http://www.arl.wustl.edu/~jaf/lpc/ for details. There is
392 no associated file format, so SoX's implementation is headerless.
394 \&\fB.mat\fR, \fB.mat4\fR, \fB.mat5\fR (optional)
395 Matlab 4.2/5.0 (respectively GNU Octave 2.0/2.1) format (.mat is the same as .mat4).
397 .B .m3u
399 .I playlist
400 format; contains a list of audio files.
401 SoX can read, but not write this file format.
402 See [1] for details of this format.
404 .B .maud
405 An IFF-conforming audio file type, registered by
406 MS MacroSystem Computer GmbH, published along
407 with the `Toccata' sound-card on the Amiga.
408 Allows 8bit linear, 16bit linear, A-Law, \(*m-law
409 in mono and stereo.
411 \&\fB.mp3\fR, \fB.mp2\fR (optional read, optional write)
412 MP3 compressed audio; MP3 (MPEG Layer 3) is a part of the patent-encumbered
413 MPEG standards for audio and video compression.  It is a lossy
414 compression format that achieves good compression rates with little
415 quality loss.
417 Because MP3 is patented, SoX cannot be distributed with MP3 support without
418 incurring the patent holder's fees.  Users who require SoX with MP3 support
419 must currently compile and build SoX with the MP3 libraries (LAME & MAD)
420 from source code, or, in some cases, obtain pre-built dynamically loadable
421 libraries.
423 When reading MP3 files, up to 28 bits of precision is stored although
424 only 16 bits is reported to user.  This is to allow default behavior
425 of writing 16 bit output files.  A user can specify a higher precision
426 for the output file to prevent lossing this extra information.  MP3
427 output files will use up to 24 bits of precision while encoding.
429 MP3 compression parameters can be selected using SoX's \fB\-C\fR option
430 as follows
431 (note that the current syntax is subject to change):
433 The primary parameter to the LAME encoder is the bit rate. If the
434 value of the \fB\-C\fR value is a positive integer, it's taken as
435 the bitrate in kbps (e.g. if you specify 128, it uses 128 kbps).
437 The second most important parameter is probably "quality" (really
438 performance), which allows balancing encoding speed vs. quality.
439 In LAME, 0 specifies highest quality but is very slow, while
440 9 selects poor quality, but is fast. (5 is the default and 2 is
441 recommended as a good trade-off for high quality encodes.)
443 Because the \fB\-C\fR value is a float, the fractional part is used
444 to select quality. 128.2 selects 128 kbps encoding with a quality
445 of 2. There is one problem with this approach. We need 128 to specify
446 128 kbps encoding with default quality, so 0 means use default. Instead
447 of 0 you have to use .01 (or .99) to specify the highest quality
448 (128.01 or 128.99).
450 LAME uses bitrate to specify a constant bitrate, but higher quality
451 can be achieved using Variable Bit Rate (VBR). VBR quality (really
452 size) is selected using a number from 0 to 9. Use a value of 0 for high
453 quality, larger files, and 9 for smaller files of lower quality. 4 is
454 the default.
456 In order to squeeze the selection of VBR into the the \fB\-C\fR value
457 float we use negative numbers to select VRR. -4.2 would select default
458 VBR encoding (size) with high quality (speed). One special case is 0,
459 which is a valid VBR encoding parameter but not a valid bitrate.
460 Compression value of 0 is always treated as a high quality vbr, as a
461 result both -0.2 and 0.2 are treated as highest quality VBR (size) and
462 high quality (speed).
464 See also
465 .B Ogg Vorbis
466 for a similar format.
468 \&\fB.mp4\fR, \fB.m4a\fR (optional)
469 MP4 compressed audio.  MP3 (MPEG 4) is part of the
470 MPEG standards for audio and video compression.  See
471 .B mp3
472 for more information.
474 \&\fB.nist\fR (also with \fB\-t sndfile\fR)
475 See \fB.sph\fR.
477 \&\fB.ogg\fR, \fB.vorbis\fR (optional)
478 Xiph.org's Ogg Vorbis compressed audio; an open, patent-free CODEC designed
479 for music and streaming audio.  It is a lossy compression format (similar to
480 MP3, VQF & AAC) that achieves good compression rates with a minimum amount
481 of quality loss.
483 SoX can decode all types of Ogg Vorbis files, and can encode at different
484 compression levels/qualities given as a number from \-1 (highest
485 compression/lowest quality) to 10 (lowest compression, highest quality).
486 By default the encoding quality level is 3 (which gives an encoded rate
487 of approx. 112kbps), but this can be changed using the
488 .B \-C
489 option (see above) with a number from \-1 to 10; fractional numbers (e.g.
490 3\*d6) are also allowed.
491 Decoding is somewhat CPU intensive and encoding is very CPU intensive.
493 See also
494 .B .mp3
495 for a similar format.
497 \fBoss\fR (optional)
498 Open Sound System /dev/dsp device driver; supports both playing and
499 recording audio.  OSS support is available in Unix-like operating systems,
500 sometimes together with alternative sound systems (such as ALSA).  Examples:
502         sox infile \-t oss
503         sox infile \-t oss /dev/dsp
504         sox \-2 \-t oss /dev/dsp outfile
506 See also
507 .BR play (1),
508 .BR rec (1),
510 .BR sox (1)
511 .BR \-d .
513 \&\fB.paf\fR, \fB.fap\fR (optional)
514 Ensoniq PARIS file format (big and little-endian respectively).
516 .B .pls
518 .I playlist
519 format; contains a list of audio files.
520 SoX can read, but not write this file format.
521 See [2] for details of this format.
523 Note: SoX support for SHOUTcast PLS relies on
524 .BR wget (1)
525 and is only partially supported: it's necessary to
526 specify the audio type manually, e.g.
528         play \-t mp3 \(dqhttp://a.server/pls?rn=265&file=filename.pls\(dq
530 and SoX does not know about alternative servers\*mhit Ctrl-C twice in
531 quick succession to quit.
533 .B .prc
534 Psion Record. Used in Psion EPOC PDAs (Series 5, Revo and similar) for
535 System alarms and recordings made by the built-in Record application.
536 When writing, SoX defaults to A-law, which is recommended; if you must
537 use ADPCM, then use the \fB\-i\fR switch. The sound quality is poor
538 because Psion Record seems to insist on frames of 800 samples or
539 fewer, so that the ADPCM CODEC has to be reset at every 800 frames,
540 which causes the sound to glitch every tenth of a second.
542 \fBpulseaudio\fR (optional)
543 PulseAudio driver; supports both playing and recording of audio.
544 PulseAudio is a cross platform networked sound server.  
545 If a file name is specified with this driver, it is ignored.  Examples:
547         sox infile \-t pulseaudio
548         sox infile \-t pulseaudio default
550 See also
551 .BR play (1),
552 .BR rec (1),
554 .BR sox (1)
555 .BR \-d .
557 \&\fB.pvf\fR (optional)
558 Portable Voice Format.
560 \&\fB.sd2\fR (optional)
561 Sound Designer 2 format.
563 \&\fB.sds\fR (optional)
564 MIDI Sample Dump Standard.
566 \&\fB.sf\fR (also with \fB\-t sndfile\fR)
567 IRCAM SDIF (Institut de Recherche et Coordination Acoustique/Musique
568 Sound Description Interchange Format). Used by academic music software
569 such as the CSound package, and the MixView sound sample editor.
571 \&\fB.sln\fR
572 Asterisk PBX `signed linear' 8khz, 16-bit signed integer, little-endian
573 raw format.
575 \&\fB.sph\fR, \fB.nist\fR (also with \fB\-t sndfile\fR)
576 SPHERE (SPeech HEader Resources) is a file format defined by NIST
577 (National Institute of Standards and Technology) and is used with
578 speech audio.  SoX can read these files when they contain
579 \(*m-law and PCM data.  It will ignore any header information that
580 says the data is compressed using \fIshorten\fR compression and
581 will treat the data as either \(*m-law or PCM.  This will allow SoX
582 and the command line \fIshorten\fR program to be run together using
583 pipes to encompasses the data and then pass the result to SoX for processing.
585 .B .smp
586 Turtle Beach SampleVision files.
587 SMP files are for use with the PC-DOS package SampleVision by Turtle Beach
588 Softworks.  This package is for communication to several MIDI samplers.  All
589 sample rates are supported by the package, although not all are supported by
590 the samplers themselves.  Currently loop points are ignored.
592 .B .snd
594 .BR .au ,
595 .B .sndr
597 .BR .sndt .
599 \fBsndfile\fR (optional)
600 This is a pseudo-type that forces libsndfile to be used. For writing files, the
601 actual file type is then taken from the output file name; for reading
602 them, it is deduced from the file.
604 \fBsndio\fR (optional)
605 OpenBSD audio device driver; supports both playing and recording audio.
607         sox infile \-t sndio
609 See also
610 .BR play (1),
611 .BR rec (1),
613 .BR sox (1)
614 .BR \-d .
616 .B .sndr
617 Sounder files.
618 An MS-DOS/Windows format from the early '90s.
619 Sounder files usually have the extension `.SND'.
621 .B .sndt
622 SoundTool files.
623 An MS-DOS/Windows format from the early '90s.
624 SoundTool files usually have the extension `.SND'.
626 .B .sou
627 An alias for the
628 .B .u8
629 raw format.
631 .B .sox
632 SoX's native uncompressed PCM format, intended for storing (or piping)
633 audio at intermediate processing points (i.e. between SoX invocations).
634 It has much in common with the popular WAV, AIFF, and AU uncompressed PCM
635 formats, but has the following specific characteristics: the PCM samples
636 are always stored as 32 bit signed integers, the samples are stored (by
637 default) as `native endian', and the number of samples in the file is
638 recorded as a 64-bit integer.  Comments are also supported.
640 See `Special Filenames' in
641 .BR sox (1)
642 for examples of using the
643 .B .sox
644 format with `pipes'.
646 \fBsunau\fR (optional)
647 Sun /dev/audio device driver; supports both playing and
648 recording audio.  For example:
650         sox infile \-t sunau /dev/audio
654         sox infile \-t sunau \-U \-c 1 /dev/audio
656 for older sun equipment.
658 See also
659 .BR play (1),
660 .BR rec (1),
662 .BR sox (1)
663 .BR \-d .
665 .B .txw
666 Yamaha TX-16W sampler.
667 A file format from a Yamaha sampling keyboard which wrote IBM-PC
668 format 3\*d5\(dq floppies.  Handles reading of files which do not have
669 the sample rate field set to one of the expected by looking at some
670 other bytes in the attack/loop length fields, and defaulting to
671 33\ kHz if the sample rate is still unknown.
673 .B .vms
675 .BR .dvms .
677 \&\fB.voc\fR (also with \fB\-t sndfile\fR)
678 Sound Blaster VOC files.
679 VOC files are multi-part and contain silence parts, looping, and
680 different sample rates for different chunks.
681 On input, the silence parts are filled out, loops are rejected,
682 and sample data with a new sample rate is rejected.
683 Silence with a different sample rate is generated appropriately.
684 On output, silence is not detected, nor are impossible sample rates.
685 SoX supports reading (but not writing) VOC files with multiple
686 blocks, and files containing \(*m-law, A-law, and 2/3/4-bit ADPCM samples.
688 .B .vorbis
690 .BR .ogg .
692 \&\fB.vox\fR (also with \fB\-t sndfile\fR)
693 A headerless file of Dialogic/OKI ADPCM audio data commonly comes with the
694 extension .vox.  This ADPCM data has 12-bit precision packed into only 4-bits.
696 Note: some early Dialogic hardware does not always reset the ADPCM
697 encoder at the start of each vox file.  This can result in clipping
698 and/or DC offset problems when it comes to decoding the audio.  Whilst
699 little can be done about the clipping, a DC offset can be removed by
700 passing the decoded audio through a high-pass filter, e.g.:
702         sox input.vox output.wav highpass 10
705 \&\fB.w64\fR (optional)
706 Sonic Foundry's 64-bit RIFF/WAV format.
708 \&\fB.wav\fR (also with \fB\-t sndfile\fR)
709 Microsoft .WAV RIFF files.
710 This is the native audio file format of Windows, and widely used for uncompressed audio.
712 Normally \fB.wav\fR files have all formatting information
713 in their headers, and so do not need any format options
714 specified for an input file.  If any are, they will
715 override the file header, and you will be warned to this effect.
716 You had better know what you are doing! Output format
717 options will cause a format conversion, and the \fB.wav\fR
718 will written appropriately.
720 SoX can read and write linear PCM, floating point, \(*m-law, A-law, MS ADPCM, and IMA (or DVI) ADPCM encoded samples.
721 WAV files can also contain audio encoded in many other ways (not currently
722 supported with SoX) e.g. MP3; in some cases such a file can still be
723 read by SoX by overriding the file type, e.g.
725    play -t mp3 mp3-encoded.wav
727 Big endian versions of RIFF files, called RIFX, are also supported.
728 To write a RIFX file, use the
729 .B \-B
730 option with the output file options.
732 \fBwaveaudio\fR (optional)
733 MS-Windows native audio device driver.  Examples:
735         sox infile \-t waveaudio
736         sox infile \-t waveaudio default
737         sox infile \-t waveaudio 1
738         sox infile \-t waveaudio "High Definition Audio Device ("
740 If the device name is omitted, \fB-1\fR, or \fBdefault\fR, then you
741 get the `Microsoft Wave Mapper' device.  Wave Mapper means `use the
742 system default audio devices'.  You can control what `default' means
743 via the OS Control Panel.
745 If the device name given is some other number, you get that audio
746 device by index; so recording with device name \fB0\fR would get the
747 first input device (perhaps the microphone), \fB1\fR would get the
748 second (perhaps line in), etc.  Playback using \fB0\fR will get the
749 first output device (usually the only audio device).
751 If the device name given is something other than a number, SoX tries
752 to match it (maximum 31 characters) against the names of the available
753 devices.
755 See also
756 .BR play (1),
757 .BR rec (1),
759 .BR sox (1)
760 .BR \-d .
762 .B .wavpcm
763 A non-standard, but widely used, variant of
764 .BR .wav .
765 Some applications cannot read a standard WAV file header for PCM-encoded
766 data with sample-size greater than 16-bits or with more than two
767 channels, but can read a non-standard
768 WAV header.  It is likely that such applications will eventually be
769 updated to support the standard header, but in the mean time, this SoX
770 format can be used to create files with the non-standard header that
771 should work with these applications.  (Note that SoX will automatically
772 detect and read WAV files with the non-standard header.)
774 The most common use of this file-type is likely to be along the following
775 lines:
777         sox infile.any \-t wavpcm \-s outfile.wav
780 \&\fB.wv\fR (optional)
781 WavPack lossless audio compression.  Note that, when converting
782 .B .wav
783 to this format and back again,
784 the RIFF header is not necessarily preserved losslessly (though the audio is).
786 \&\fB.wve\fR (also with \fB\-t sndfile\fR)
787 Psion 8-bit A-law.  Used on Psion SIBO PDAs (Series 3 and similar).
788 This format is deprecated in SoX, but will continue to be used in
789 libsndfile.
791 .B .xa
792 Maxis XA files.
793 These are 16-bit ADPCM audio files used by Maxis games.  Writing .xa files is
794 currently not supported, although adding write support should not be very
795 difficult.
797 \&\fB.xi\fR (optional)
798 Fasttracker 2 Extended Instrument format.
799 .SH SEE ALSO
800 .BR sox (1),
801 .BR soxi (1),
802 .BR libsox (3),
803 .BR octave (1),
804 .BR wget (1)
806 The SoX web page at http://sox.sourceforge.net
808 SoX scripting examples at http://sox.sourceforge.net/Docs/Scripts
809 .SS References
812 Wikipedia,
813 .IR "M3U" ,
814 http://en.wikipedia.org/wiki/M3U
817 Wikipedia,
818 .IR "PLS" ,
819 http://en.wikipedia.org/wiki/PLS_(file_format)
820 .SH LICENSE
821 Copyright 1998\-2011 Chris Bagwell and SoX Contributors.
823 Copyright 1991 Lance Norskog and Sundry Contributors.
824 .SH AUTHORS
825 Chris Bagwell (cbagwell@users.sourceforge.net).
826 Other authors and contributors are listed in the ChangeLog file that
827 is distributed with the source code.