History

Replaced -n with --; it's much better visually, -n was all too easily lost in a sea of other parameters.

robs committed 19 years ago

Commit e4b349b1 parent 7cefbde6 files · +84 −65Browse files

Unified · Split

6 files
  1. ChangeLog +1 −1
  2. scripts/audiogen +3 −3
  3. sox.1 +58 −42
  4. src/sox.c +19 −17
  5. src/st_i.h +1 −0
  6. src/tests.sh +2 −2
ChangeLog+1−1
@@ -60,7 +60,7 @@ sox-12.18.3 · 59 unmodified lines
60 for backwards compatibility by "resample".60 for backwards compatibility by "resample".
61 o Preview mode now removed, as all it did was use rate rather than61 o Preview mode now removed, as all it did was use rate rather than
62 resample, and rate has been removed.62 resample, and rate has been removed.
63 o Improved synth usage (by introducing -n option) and improved synth63 o Improved synth usage (by introducing --) and improved the synth
64 entry in the man-page. (robs)64 entry in the man-page. (robs)
65 o Documented the butterworth filter effects. (robs)65 o Documented the butterworth filter effects. (robs)
66 o Added command line options for specifying the output file66 o Added command line options for specifying the output file
scripts/audiogen+3−3
@@ -2,8 +2,8 @@ · 1 unmodified line
2#2#
3# usage:audiogen <rate> <channels> <filename> <length> <audio generator options>3# usage:audiogen <rate> <channels> <filename> <length> <audio generator options>
4#4#
5# Example of using the "nul" file handler along with "synth" effect5# Example of using the "null" file handler along with "synth" effect
6# to generate audio data. Nul file handler pipes a stream of null6# to generate audio data. Null file handler pipes a stream of null
7# data non-stop. Synth effect overrides it with its own data and7# data non-stop. Synth effect overrides it with its own data and
8# stops based on length parameter.8# stops based on length parameter.
9 9
@@ -21,4 +21,4 @@ shift · 11 unmodified lines
21filename=$121filename=$1
22shift22shift
23 23
24sox -s -w -t nul -r $rate -c $channels /dev/null $filename synth $*24sox -s -w -r $rate -c $channels -- $filename synth $*
sox.1+58−42
@@ -1,7 +1,7 @@
1'\" t1'\" t
2'\" The line above instructs most `man' programs to invoke tbl2'\" The line above instructs most `man' programs to invoke tbl
3'\"3'\"
4'\" Separate paragraphs; not the same as .PP which resets indent level.4'\" Separate paragraphs; not the same as PP which resets indent level.
5.de SP5.de SP
6.if t .sp .56.if t .sp .5
7.if n .sp7.if n .sp
@@ -271,10 +271,9 @@ More examples can found thoughout this manual and in the · 263 unmodified lines
271separate271separate
272.BR soxexam (1)272.BR soxexam (1)
273manual.273manual.
274.SH OPTIONS274.SH FILE-NAMES
275.SS Special File-name Options275The following may be used in certain circumstances in place of a normal
276Each of these options is used in certain circumstances in place of a normal276file-name on the command line:
277file-name on the command line.
278.TP277.TP
279\fB\-\fR278\fB\-\fR
280SoX can be used in pipeline operations by using the special279SoX can be used in pipeline operations by using the special
@@ -288,16 +287,24 @@ Note that when using this option, the file-type (see · 7 unmodified lines
288.B \-t287.B \-t
289below) must also be given.288below) must also be given.
290.TP289.TP
291\fB\-n\fR290\fB\-\-\fR
292This can be used in place of an input or output file-name291This can be used in place of an input or output file-name
293to specify that the `null' file type should be used. See292to specify that a `null' file is to be used. See
294.B null293.B null
295below for further information.294below for further information.
296.TP295.TP
297\fB\-e\fR296\fB\-e\fR
298This is an alias of297This is an alias of
299.B \-n298.B \-\-
300and is retained for backwards compatibility only.299and is retained for backwards compatibility only.
300.PP
301.B N.B.
302Giving SoX an input or output file-name that is the same as a SoX
303effect-name will not work since SoX will treat it as an effect
304specification. The only work-around to this is to avoid such
305file-names; however, this is generally not difficult since most audio
306file-names have a file-name `extension', whilst effect-names do not.
307.SH OPTIONS
301.SS Global Options308.SS Global Options
302These options can be specified on the command line at any point309These options can be specified on the command line at any point
303before the first effect name.310before the first effect name.
@@ -340,11 +347,11 @@ the left and right channels of the stereo file. · 36 unmodified lines
340Run in a mode that can be used, in conjunction with the GNU347Run in a mode that can be used, in conjunction with the GNU
341Octave program, to assist with the selection and configuration348Octave program, to assist with the selection and configuration
342of many of the filtering effects. For the first given effect349of many of the filtering effects. For the first given effect
343that supports the \fB\-o\fR option, SoX will output Octave350that supports the \fB\-\-octave\fR option, SoX will output Octave
344commands to plot the effect's transfer function, and then exit351commands to plot the effect's transfer function, and then exit
345without actually processing any audio. E.g.352without actually processing any audio. E.g.
346.SP353.SP
347 sox \-o input-file \-n highpass 1320 > plot.m354 sox \-\-octave input-file \-\- highpass 1320 > plot.m
348.br355.br
349 octave plot.m356 octave plot.m
350.TP357.TP
@@ -766,7 +773,7 @@ This is a special file type that can be used when normal · 415 unmodified lines
766file reading or writing is not needed to use a particular effect.773file reading or writing is not needed to use a particular effect.
767It is selected by using the774It is selected by using the
768special file-name775special file-name
769.B \-n776.B \-\-
770in place of an input or output file-name.777in place of an input or output file-name.
771.SP778.SP
772Using this file type to input audio is equivalent to779Using this file type to input audio is equivalent to
@@ -788,7 +795,7 @@ with · 15 unmodified lines
788.B \-V795.B \-V
789to display information from the audio file header796to display information from the audio file header
790without having to read any further into the file, e.g.797without having to read any further into the file, e.g.
791.B sox \-V *.wav \-n798.B sox \-V *.wav \-\-
792will display header information for each `WAV' file in the current799will display header information for each `WAV' file in the current
793directory.800directory.
794.TP801.TP
@@ -1052,7 +1059,7 @@ i.e. peaking at the · 257 unmodified lines
1052.I center1059.I center
1053frequency and settling around it.1060frequency and settling around it.
1054.SP1061.SP
1055This effect supports the \fB\-o\fR global option (see above).1062This effect supports the \fB\-\-octave\fR global option (see above).
1056.SP1063.SP
1057See also \fBfilter\fR for a bandpass filter with steeper shoulders.1064See also \fBfilter\fR for a bandpass filter with steeper shoulders.
1058.TP1065.TP
@@ -1063,7 +1070,7 @@ and bandwidth (in Hz, and as determined by the 3dB points) · 4 unmodified lines
1063\fIbandwidth\fR.1070\fIbandwidth\fR.
1064The filter rolls off at 6dB per octave (20dB per decade).1071The filter rolls off at 6dB per octave (20dB per decade).
1065.SP1072.SP
1066These effects support the \fB\-o\fR global option (see above).1073These effects support the \fB\-\-octave\fR global option (see above).
1067.TP1074.TP
1068\fBbandreject \fIfrequency bandwidth\fR1075\fBbandreject \fIfrequency bandwidth\fR
1069Apply a band-reject filter.1076Apply a band-reject filter.
@@ -1072,8 +1079,8 @@ See the description of the \fBbandpass\fR effect for details. · 2 unmodified lines
1072\fBbass\fR\^|\^\fBtreble \fIgain\fR [\fIfrequency\fR] [\fIslope\fR]1079\fBbass\fR\^|\^\fBtreble \fIgain\fR [\fIfrequency\fR] [\fIslope\fR]
1073Boost or cut the bass (lower) or treble (upper) frequencies of the audio1080Boost or cut the bass (lower) or treble (upper) frequencies of the audio
1074using a two-pole shelving filter with a response similar to that1081using a two-pole shelving filter with a response similar to that
1075of a standard hi-fi's (Baxandall) tone controls. This is also1082of a standard hi-fi's (Baxandall) tone-controls. This is also
1076known as shelving equalisation or EQ.1083known as shelving equalisation (EQ).
1077.SP1084.SP
1078\fIgain\fR gives the dB gain at 0Hz (for \fBbass\fR), or whichever is1085\fIgain\fR gives the dB gain at 0Hz (for \fBbass\fR), or whichever is
1079the lower of \(ap22kHz and the Nyquist frequency (for \fBtreble\fR). Its1086the lower of \(ap22kHz and the Nyquist frequency (for \fBtreble\fR). Its
@@ -1096,7 +1103,7 @@ steep the filter's shelf transition is. Its useful range is · 16 unmodified lines
1096about 0\*d3 (for a gentle slope) to 1 (for a steep slope). The1103about 0\*d3 (for a gentle slope) to 1 (for a steep slope). The
1097default value is 0\*d5.1104default value is 0\*d5.
1098.SP1105.SP
1099These effects support the \fB\-o\fR global option (see above).1106These effects support the \fB\-\-octave\fR global option (see above).
1100.SP1107.SP
1101See also \fBequalizer\fR for a peaking equalisation effect.1108See also \fBequalizer\fR for a peaking equalisation effect.
1102.TP1109.TP
@@ -1169,7 +1176,7 @@ audio-CD format. The frequency response of pre-emphasized · 66 unmodified lines
1169recordings is rectified. The filtering is defined in the1176recordings is rectified. The filtering is defined in the
1170standard document ISO 908.1177standard document ISO 908.
1171.SP1178.SP
1172This effect supports the \fB\-o\fR global option (see above).1179This effect supports the \fB\-\-octave\fR global option (see above).
1173.SP1180.SP
1174.TP1181.TP
1175\fBdither\fR [\fIdepth\fR]1182\fBdither\fR [\fIdepth\fR]
@@ -1210,16 +1217,16 @@ pair gives the delay in milliseconds · 34 unmodified lines
1210and the decay (relative to gain-in) of that echo.1217and the decay (relative to gain-in) of that echo.
1211Gain-out is the volume of the output.1218Gain-out is the volume of the output.
1212.TP1219.TP
1213\fBequalizer \fIcentral-frequency Q gain\fR1220\fBequalizer \fIfrequency Q gain\fR
1214Apply a two-pole peaking equalisation (EQ) filter.1221Apply a two-pole peaking equalisation (EQ) filter.
1215This allows modification (\fIgain\fR) of the signal level at and1222With this filter, the signal-level at and around a selected frequency
1216around (\fIQ\fR) a central frequency (\fIcentral-frequency\fR),1223can be increased or decreased, whilst (unlike band-pass and band-reject
1217leaving all other frequencies untouched (unlike1224filters) that at all other frequencies is unchanged.
1218bandpass/bandreject filters).1225.SP
1219.SP1226\fIfrequency\fR gives the filter's central frequency in Hz, \fIQ\fR its
1220\fIcentral-frequency\fR is the filter's central frequency in Hz, \fIQ\fR1227band-width specified as a `Q-factor' (see
1221its `Q-factor' (see http://en.wikipedia.org/wiki/Q_factor), and1228http://en.wikipedia.org/wiki/Q_factor), and \fIgain\fR the required gain
1222\fIgain\fR is the gain or attenuation in dB.1229or attenuation in dB.
1223Beware of1230Beware of
1224.B Clipping1231.B Clipping
1225when using a positive \fIgain\fR.1232when using a positive \fIgain\fR.
@@ -1227,7 +1234,7 @@ when using a positive \fIgain\fR. · 1 unmodified line
1227In order to produce complex equalisation curves, this effect1234In order to produce complex equalisation curves, this effect
1228can be given several times, each with a different central frequency.1235can be given several times, each with a different central frequency.
1229.SP1236.SP
1230This effect supports the \fB\-o\fR global option (see above).1237This effect supports the \fB\-\-octave\fR global option (see above).
1231.SP1238.SP
1232See also \fBbass\fR and \fBtreble\fR for shelving equalisation effects.1239See also \fBbass\fR and \fBtreble\fR for shelving equalisation effects.
1233.TP1240.TP
@@ -1310,7 +1317,7 @@ Apply a single-pole recursive high-pass or low-pass filter with · 76 unmodified lines
13103dB point \fIfrequency\fR.13173dB point \fIfrequency\fR.
1311The filters roll off at 6dB per octave (20dB per decade).1318The filters roll off at 6dB per octave (20dB per decade).
1312.SP1319.SP
1313These effects support the \fB\-o\fR global option (see above).1320These effects support the \fB\-\-octave\fR global option (see above).
1314.SP1321.SP
1315See also \fBfilter\fR for filters with a sharper cutoff.1322See also \fBfilter\fR for filters with a sharper cutoff.
1316.TP1323.TP
@@ -1319,7 +1326,7 @@ Apply a two-pole Butterworth high-pass or low-pass filter with · 2 unmodified lines
13193dB point \fIfrequency\fR.13263dB point \fIfrequency\fR.
1320The filters roll off at 12dB per octave (40dB per decade).1327The filters roll off at 12dB per octave (40dB per decade).
1321.SP1328.SP
1322These effects support the \fB\-o\fR global option (see above).1329These effects support the \fB\-\-octave\fR global option (see above).
1323.TP1330.TP
1324\fBlowp \fIfrequency\fR1331\fBlowp \fIfrequency\fR
1325Apply a low-pass filter.1332Apply a low-pass filter.
@@ -1771,45 +1778,49 @@ still be specified. This can be used to set the synthesised audio · 445 unmodified lines
1771length, the number of channels, and the sampling rate, however since the1778length, the number of channels, and the sampling rate, however since the
1772input file's audio is not needed, the1779input file's audio is not needed, the
1773.B null1780.B null
1774file `\fB\-n\fR' is usually used instead (and the length specified1781file `\fB\-\-\fR' is usually used instead (and the length specified
1775as a parameter to \fBsynth\fR).1782as a parameter to \fBsynth\fR or by another given effect that can has an
1783associated length).
1776.SP1784.SP
1777For example, the following produces a 3 second, 44\*d1kHz,1785For example, the following produces a 3 second, 44\*d1kHz,
1778stereo audio file containing a sine-wave swept from 300 to 3300Hz.1786stereo audio file containing a sine-wave swept from 300 to 3300Hz.
1779.SP1787.SP
1780 sox \-n output.au synth 3 sine 300\-33001788 sox \-\- output.au synth 3 sine 300\-3300
1781.SP1789.SP
1782This produces an 8kHz mono version:1790This produces an 8kHz mono version:
1783.SP1791.SP
1784 sox \-r 8000 \-c 1 \-n output.au synth 3 sine 300\-33001792 sox \-r 8000 \-c 1 \-\- output.au synth 3 sine 300\-3300
1785.SP1793.SP
1786Multiple channels can be synthesised by specifying the set of1794Multiple channels can be synthesised by specifying the set of
1787parameters shown between braces multiple times;1795parameters shown between braces multiple times;
1788the following puts the swept tone in the left channel and adds `brown'1796the following puts the swept tone in the left channel and adds `brown'
1789noise in the right:1797noise in the right:
1790.SP1798.SP
1791 sox \-n output.au synth 3 sine 300\-3300 brownnoise1799 sox \-\- output.au synth 3 sine 300\-3300 brownnoise
1792.SP1800.SP
1793The following example shows how two synth effects can be cascaded1801The following example shows how two synth effects can be cascaded
1794to create a more complex waveform:1802to create a more complex waveform:
1795.SP1803.SP
1796 sox \-n output.au synth 0\*d5 sine 200\-500 synth 0\*d5 sine fmod 700\-1001804 sox \-\- output.au synth 0\*d5 sine 200\-500 synth 0\*d5 sine fmod 700\-100
1797.SP1805.SP
1798Frequencies can also specified in terms of musical semitones relative to1806Frequencies can also specified in terms of musical semitones relative to
1799`middle A' (440Hz); the following could be used to help tune1807`middle A' (440Hz); the following could be used to help tune
1800a guitar's `low E' string (on a system that supports1808a guitar's `low E' string (on a system that supports
1801\fBalsa\fR):1809\fBalsa\fR):
1802.SP1810.SP
1803 sox \-n \-t alsa default synth sine %\-51811 sox \-\- \-t alsa default synth sine %\-5
1804.SP1812.SP
1805The following produces a chord with a pipe-organ sound:1813The following produces a chord with a pipe-organ sound:
1806.SP1814.SP
1807 sox \-c4 \-n \-c1 Am7.au synth sin %0 sin %3 sin %7 sin %10 avg fade q 0\*d1 1 0\*d11815 sox \-c4 \-\- \-c1 Am7.au synth sin %0 sin %3 sin %7 sin %10 avg fade q 0\*d1 1 0\*d1
1808.SP1816.SP
1809N.B. This effect generates audio at maximum volume, which means that there1817.B N.B.
1818This effect generates audio at maximum volume, which means that there
1810is a high chance of clipping when using the audio subsequently, so1819is a high chance of clipping when using the audio subsequently, so
1811in most cases, you will want to follow this effect with the \fBvol\fR1820in most cases, you will want to follow this effect with the \fBvol\fR
1812effect to select a suitable attenuation.1821effect to prevent this from happening. (See also
1822.B Clipping
1823above.)
1813.SP1824.SP
1814A detailed description of each1825A detailed description of each
1815.B synth1826.B synth
@@ -1831,7 +1842,12 @@ for specifying sample counts is the number of samples with the letter · 15 unmodified lines
1831.SP1842.SP
1832\fIfreq\fR/\fIfreq2\fR are the frequencies at the beginning/end of1843\fIfreq\fR/\fIfreq2\fR are the frequencies at the beginning/end of
1833synthesis in Hz or, if preceded with `%', semitones relative to A1844synthesis in Hz or, if preceded with `%', semitones relative to A
1834(440Hz); for both, default=%0. Not used for noise.1845(440Hz); for both, default=%0. If
1846.I freq2
1847is given, then
1848.I len
1849must also have been given.
1850Not used for noise.
1835.SP1851.SP
1836\fIoff\fR is the bias (DC-offset) of the signal in percent; default=0.1852\fIoff\fR is the bias (DC-offset) of the signal in percent; default=0.
1837.SP1853.SP
@@ -1849,7 +1865,7 @@ begins; default=50. exp: the amplitude in percent; default=100. · 11 unmodified lines
1849ends; default=60.1865ends; default=60.
1850.TP1866.TP
1851\fBtreble \fIgain\fR [\fIfrequency\fR] [\fIslope\fR]1867\fBtreble \fIgain\fR [\fIfrequency\fR] [\fIslope\fR]
1852Apply a treble tone control effect.1868Apply a treble tone-control effect.
1853See the description of the \fBbass\fR effect for details.1869See the description of the \fBbass\fR effect for details.
1854.TP1870.TP
1855\fBtrim \fIstart\fR [\fIlength\fR]1871\fBtrim \fIstart\fR [\fIlength\fR]
src/sox.c+19−17
@@ -260,15 +260,13 @@ int main(int argc, char **argv) · 259 unmodified lines
260 * found. */260 * found. */
261 while (optind < argc && !is_effect_name(argv[optind])) {261 while (optind < argc && !is_effect_name(argv[optind])) {
262 file_info_t fi = make_file_info();262 file_info_t fi = make_file_info();
263 struct file_info fi_none;263 struct file_info fi_none = *fi;
264 264
265 if (file_count >= MAX_FILES) {265 if (file_count >= MAX_FILES) {
266 st_fail("Too many filenames; maximum is %d input files and 1 output file", MAX_INPUT_FILES);266 st_fail("Too many filenames; maximum is %d input files and 1 output file", MAX_INPUT_FILES);
267 exit(1);267 exit(1);
268 }268 }
269 269
270 fi_none = *fi;
271
272 if (doopts(fi, argc, argv)) { /* is null file? */270 if (doopts(fi, argc, argv)) { /* is null file? */
273 if (fi->filetype != NULL && strcmp(fi->filetype, "null") != 0)271 if (fi->filetype != NULL && strcmp(fi->filetype, "null") != 0)
274 st_warn("Ignoring \"-t %s\".", fi->filetype);272 st_warn("Ignoring \"-t %s\".", fi->filetype);
@@ -416,7 +414,7 @@ static char * read_comment_file(char const * const filename) · 141 unmodified lines
416 return result;414 return result;
417}415}
418 416
419static char *getoptstr = "+abc:defghilmnoqr:st:uv:wxABC:DLMNRSUV::X12348";417static char *getoptstr = "+abc:defghilmoqr:st:uv:wxABC:DLMNRSUV::X12348";
420 418
421static struct option long_options[] =419static struct option long_options[] =
422 {420 {
@@ -447,15 +445,20 @@ static struct option long_options[] = · 24 unmodified lines
447 445
448static bool doopts(file_info_t fi, int argc, char **argv)446static bool doopts(file_info_t fi, int argc, char **argv)
449{447{
450 bool isnull = false;448 while (true) {
451 int option_index, c;449 int option_index;
452
453 while ((c = getopt_long(argc, argv, getoptstr, long_options, &option_index)) != -1) {
454 int i; /* Needed since scanf %u allows negative numbers :( */450 int i; /* Needed since scanf %u allows negative numbers :( */
455 char dummy; /* To check for extraneous chars in optarg. */451 char dummy; /* To check for extraneous chars in optarg. */
456 452
457 switch (c) {453 if (strcmp(argv[optind], "--") == 0) {
458 case 0: /* Long options with no short equivalent. */454 ++optind;
455 return true; /* I.e. is null file. */
456 }
457 switch (getopt_long(argc, argv, getoptstr, long_options, &option_index)) {
458 case -1: /* @ one of: file-name, effect name, or end of arg-list. */
459 return false; /* I.e. not null file. */
460
461 case 0: /* Long options with no short equivalent. */
459 switch (option_index) {462 switch (option_index) {
460 case 0:463 case 0:
461 fi->comment = read_comment_file(optarg);464 fi->comment = read_comment_file(optarg);
@@ -509,8 +512,8 @@ static bool doopts(file_info_t fi, int argc, char **argv) · 47 unmodified lines
509 repeatable_random = true;512 repeatable_random = true;
510 break;513 break;
511 514
512 case 'e': case 'n':515 case 'e': /* Deprecated in favour of -- */
513 isnull = true; /* Is null file. */516 return true; /* I.e. is null file. */
514 break;517 break;
515 518
516 case 'h': case '?':519 case 'h': case '?':
@@ -624,8 +627,6 @@ static bool doopts(file_info_t fi, int argc, char **argv) · 107 unmodified lines
624 break;627 break;
625 }628 }
626 }629 }
627
628 return isnull;
629}630}
630 631
631static int compare_input(ft_t ft1, ft_t ft2)632static int compare_input(ft_t ft1, ft_t ft2)
@@ -1623,13 +1624,13 @@ static void usage(char const * message) · 991 unmodified lines
1623 printf("Version %s\n\n", st_version());1624 printf("Version %s\n\n", st_version());
1624 if (message)1625 if (message)
1625 fprintf(stderr, "Failed: %s\n\n", message);1626 fprintf(stderr, "Failed: %s\n\n", message);
1626 printf("Usage: [gopts] [fopts] %s outfile [effect [effopts]...]\n\n",1627 printf("Usage summary: [gopts] [fopts] %s outfile [effect [effopts]...]\n\n",
1627 combine_method == SOX_MIX ? "infile1 [fopts] infile2 [fopts]" : "infile [fopts]");1628 combine_method == SOX_MIX ? "infile1 [fopts] infile2 [fopts]" : "infile [fopts]");
1628 printf(1629 printf(
1629 "Special filenames:\n"1630 "Special filenames:\n"
1630 "\n"1631 "\n"
1631 "- stdin (infile) or stdout (outfile)\n"1632 "- stdin (infile) or stdout (outfile)\n"
1632 "-n, -e use the null file handler; for use with e.g. synth & stat\n"1633 "-- use the null file handler; for use with e.g. synth & stat\n"
1633 "\n"1634 "\n"
1634 "Global options (gopts) (can be specified at any point before the first effect):\n"1635 "Global options (gopts) (can be specified at any point before the first effect):\n"
1635 "\n"1636 "\n"
@@ -1639,7 +1640,7 @@ static void usage(char const * message) · 3 unmodified lines
1639 " display usage of specified effect. use 'all' to display all\n"1640 " display usage of specified effect. use 'all' to display all\n"
1640 "-m, --mix mix multiple input files (instead of concatenating)\n"1641 "-m, --mix mix multiple input files (instead of concatenating)\n"
1641 "-M, --merge merge multiple input files (instead of concatenating)\n"1642 "-M, --merge merge multiple input files (instead of concatenating)\n"
1642 "-o generate Octave commands to plot response of filter effect\n"1643 "--octave generate Octave commands to plot response of filter effect\n"
1643 "--play output to the default sound device; set if SoX run as `play'\n"1644 "--play output to the default sound device; set if SoX run as `play'\n"
1644 "-q run in quiet mode; opposite of -S\n"1645 "-q run in quiet mode; opposite of -S\n"
1645 "--rec input from the default sound device; set if SoX run as `rec'\n"1646 "--rec input from the default sound device; set if SoX run as `rec'\n"
@@ -1670,6 +1671,7 @@ static void usage(char const * message) · 24 unmodified lines
1670 "-B/-L force endian type to big/little\n"1671 "-B/-L force endian type to big/little\n"
1671 "-s/-u/-U/-A/ sample encoding: signed/unsigned/u-law/A-law\n"1672 "-s/-u/-U/-A/ sample encoding: signed/unsigned/u-law/A-law\n"
1672 " -a/-i/-g/-f ADPCM/IMA_ADPCM/GSM/floating point\n"1673 " -a/-i/-g/-f ADPCM/IMA_ADPCM/GSM/floating point\n"
1674
1673 "-1/-2/-3/-4/-8 sample size in bytes\n"1675 "-1/-2/-3/-4/-8 sample size in bytes\n"
1674 "-b/-w/-l/-d aliases for -1/-2/-4/-8 (byte, word, long, double-long)\n"1676 "-b/-w/-l/-d aliases for -1/-2/-4/-8 (byte, word, long, double-long)\n"
1675 "-v volume input file volume adjustment factor (real number)\n"1677 "-v volume input file volume adjustment factor (real number)\n"
src/st_i.h+1−0
@@ -193,6 +193,7 @@ extern const st_format_t *st_flac_format_fn(void); · 192 unmodified lines
193#endif193#endif
194extern const st_format_t *st_gsm_format_fn(void);194extern const st_format_t *st_gsm_format_fn(void);
195extern const st_format_t *st_hcom_format_fn(void);195extern const st_format_t *st_hcom_format_fn(void);
196extern const st_format_t *st_ima_format_fn(void);
196extern const st_format_t *st_maud_format_fn(void);197extern const st_format_t *st_maud_format_fn(void);
197extern const st_format_t *st_mp3_format_fn(void);198extern const st_format_t *st_mp3_format_fn(void);
198extern const st_format_t *st_nul_format_fn(void);199extern const st_format_t *st_nul_format_fn(void);
src/tests.sh+2−2
@@ -34,7 +34,7 @@ convertToAndFrom () { · 33 unmodified lines
34 if [ "${format1_skip}x" = "x" -a "${from_skip}x" = "x" ] ; then34 if [ "${format1_skip}x" = "x" -a "${from_skip}x" = "x" ] ; then
35 getFormat ${format1}; format1Text=$formatText; format1Flags=$formatFlags35 getFormat ${format1}; format1Text=$formatText; format1Flags=$formatFlags
36 getFormat $1; format2Text=$formatText; format2Flags=$formatFlags36 getFormat $1; format2Text=$formatText; format2Flags=$formatFlags
37 ./sox -c $channels -r $rate -n $format1Flags input.$format1 synth $samples's' sin 300-3300 noise trapezium37 ./sox -c $channels -r $rate -- $format1Flags input.$format1 synth $samples's' sin 300-3300 noise trapezium
38 ./sox $verbose -r $rate -c $channels $format1Flags input.$format1 $format2Flags intermediate.$138 ./sox $verbose -r $rate -c $channels $format1Flags input.$format1 $format2Flags intermediate.$1
39 ./sox $verbose -r $rate -c $channels $format2Flags intermediate.$1 $format1Flags output.$format139 ./sox $verbose -r $rate -c $channels $format2Flags intermediate.$1 $format1Flags output.$format1
40 40
@@ -115,7 +115,7 @@ do_multichannel_formats · 74 unmodified lines
115do_twochannel_formats115do_twochannel_formats
116do_singlechannel_formats116do_singlechannel_formats
117 117
118./sox -c 1 -n output.ub synth .01 vol .5118./sox -c 1 -- output.ub synth .01 vol .5
119if [ `wc -c <output.ub` = 441 ]; then119if [ `wc -c <output.ub` = 441 ]; then
120 echo "ok synth size"120 echo "ok synth size"
121else121else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t