ref: 7e8a91f56b3a8a94a4523891a450094a6f52db36
parent: 4571d2307f86f2ce7ae1b0e6d223698552f52f33
author: cbagwell <cbagwell>
date: Tue Sep 8 14:02:59 EDT 2009
Add support for setting default audio driver to waveaudio. Document pulseaudio and waveaudio drivers.
--- a/soxformat.7
+++ b/soxformat.7
@@ -470,6 +470,19 @@
fewer, so that the ADPCM CODEC has to be reset at every 800 frames,
which causes the sound to glitch every tenth of a second.
.TP
+\fBpulseaudio\fR (optional)
+PulseAudio driver; supports both playing and recording of audio.
+PulseAudio is a cross platform networked sound server.
+If a file name is specified with this driver, it is ignored. Examples:
+.EX
+ sox infile -t pulseaudio
+ sox infile -t pulseaudio default
+.EE
+See also
+.BR play (1)
+and
+.BR rec (1).
+.TP
\&\fB.pvf\fR (optional)
Portable Voice Format.
.TP
@@ -636,6 +649,21 @@
To write a RIFX file, use the
.B \-B
option with the output file options.
+.TP
+\fBwaveaudio\fR (optional)
+Wave Audio device driver; supports only playing of audio.
+This is a native Windows audio driver. The OSS driver is also
+often used when compiled with Cygwin under Windows since it
+has read and write support.
+If a file name is specified with this driver, it is ignored. Examples:
+.EX
+ sox infile -t waveaudio
+ sox infile -t waveaudio default
+.EE
+See also
+.BR play (1)
+and
+.BR rec (1).
.TP
.B .wavpcm
A non-standard, but widely used, variant of
--- a/src/sox.c
+++ b/src/sox.c
@@ -2353,7 +2353,8 @@
else if (!strcmp(type, "oss" ) || !strcmp(type, "ossdsp"))
name = "/dev/dsp";
else if (!strcmp(type, "alsa") || !strcmp(type, "ao") || !strcmp(type,"sndio")
- || !strcmp(type, "coreaudio") || !strcmp(type, "pulseaudio"))
+ || !strcmp(type, "coreaudio") || !strcmp(type, "pulseaudio")
+ || !strcmp(type, "waveaudio"))
name = "default";
return name? from_env? from_env : name : NULL;
@@ -2369,6 +2370,7 @@
if (!f->filetype && sox_find_format("pulseaudio" , sox_false)) f->filetype = "pulseaudio";
if (!f->filetype && sox_find_format("sunau",sox_false)) f->filetype = "sunau";
if (!f->filetype && sox_find_format("sndio", sox_false)) f->filetype = "sndio";
+ if (!f->filetype && sox_find_format("waveaudio" , sox_false)) f->filetype = "waveaudio";
if (!f->filetype && sox_find_format("ao" , sox_false) && file_count) /*!rec*/
f->filetype = "ao";