ref: ae5d6d59e82ef40300a4dece7897499685f87184
parent: 4ec47c8bfc87cd09ab79998f7e35bd87afd2041f
author: Mark Harris <[email protected]>
date: Sun Sep 27 19:32:57 EDT 2020
opusenc: Clarify raw input documentation
--- a/man/opusenc.1
+++ b/man/opusenc.1
@@ -14,7 +14,8 @@
.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 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).
--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -171,7 +171,7 @@
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 @@
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();