opusenc: Clarify raw input documentation

parent 4ec47c8b
Pipeline #2142 passed with stage
in 1 minute and 12 seconds
......@@ -14,7 +14,8 @@ opusenc \(en encode audio into the Opus format
.SH DESCRIPTION
.B opusenc
reads audio data in Wave, AIFF, FLAC, Ogg/FLAC,
or raw PCM/float format and encodes it into an Ogg Opus stream.
or raw PCM (integer or floating point) format
and encodes it into an Ogg Opus stream.
If the input file is "\fB\-\fR" audio data is read from stdin.
Likewise, if the output file is "\fB\-\fR" the Ogg Opus stream
is written to stdout.
......@@ -294,7 +295,8 @@ Interpret input as raw PCM data without headers.
Interpret input as raw floating point data without headers.
.TP
.BI --raw-bits " N"
Set bits/sample for raw input (default: 16).
Set bits/sample for raw input (default: 16; 32 for floating point).
May be 8, 16, or 24 for integer PCM or 32 for floating point.
.TP
.BI --raw-rate " N"
Set sampling rate for raw input (default: 48000).
......
......@@ -171,7 +171,7 @@ static void usage(void)
printf("\nInput options:\n");
printf(" --raw Interpret input as raw PCM data without headers\n");
printf(" --raw-float Interpret input as raw float data without headers\n");
printf(" --raw-bits n Set bits/sample for raw input (default: 16)\n");
printf(" --raw-bits n Set bits/sample for raw input (default: 16; 32 for float)\n");
printf(" --raw-rate n Set sampling rate for raw input (default: 48000)\n");
printf(" --raw-chan n Set number of channels for raw input (default: 2)\n");
printf(" --raw-endianness n 1 for big endian, 0 for little (default: 0)\n");
......@@ -801,9 +801,9 @@ int main(int argc, char **argv)
fatal("Invalid bit-depth:\n"
"--raw-bits can only be 32 for float sample format\n");
}
if (inopt.samplesize<24&&(inopt.rawmode_f)) {
if (inopt.samplesize!=32&&(inopt.rawmode_f)) {
fatal("Invalid bit-depth:\n"
"--raw-bits must be 24 or 32 for float sample format\n");
"--raw-bits must be 32 for float sample format\n");
}
if (argc_utf8-optind!=2) {
usage();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment