From a21bdc4a9e0f94abbe2f0a135d2ec16d5b17f5fb Mon Sep 17 00:00:00 2001 From: Martijn van Beurden Date: Tue, 31 Aug 2021 08:55:06 +0200 Subject: [PATCH] Documentation fixes: preset description and subset blocksizes As described in github issue #236, the description of compression presets in flac.sgml wasn't updated. Also, the description of which blocksizes are considered subset has been lagging behind in the manpages as well as the build-in help of FLAC for years, as this was changed back in 2007. This commit fixes those issues --- man/flac.1 | 4 ++-- man/flac.sgml | 14 +++++++------- src/flac/main.c | 10 ++++++---- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/man/flac.1 b/man/flac.1 index 853b89cc..0d130526 100644 --- a/man/flac.1 +++ b/man/flac.1 @@ -3,7 +3,7 @@ .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . -.TH "FLAC" "1" "2013/09/18" "" "" +.TH "FLAC" "1" "2021/08/31" "" "" .SH NAME flac \- Free Lossless Audio Codec @@ -230,7 +230,7 @@ Add a FLAC tag. The comment must adhere to the Vorbis comment spec; i.e. the FI Like --tag, except FILENAME is a file whose contents will be read verbatim to set the tag value. The contents will be converted to UTF-8 from the local charset. This can be used to store a cuesheet in a tag (e.g. --tag-from-file="CUESHEET=image.cue"). Do not try to store binary data in tag fields! Use APPLICATION blocks for that. .TP \fB-b \fI#\fB, --blocksize=\fI#\fB\fR -Specify the block size in samples. Subset streams must use one of 192, 576, 1152, 2304, 4608, 256, 512, 1024, 2048, 4096 (and 8192 or 16384 if the sample rate is >48kHz). +Specify the blocksize in samples. The default is 1152 for -l 0, else 4096. For subset streams this must be <= 4608 if the samplerate <= 48kHz, for subset streams with higher samplerates it must be <= 16384. .TP \fB-m, --mid-side\fR Try mid-side coding for each frame (stereo input only) diff --git a/man/flac.sgml b/man/flac.sgml index 87a3f238..d1edf3a2 100644 --- a/man/flac.sgml +++ b/man/flac.sgml @@ -4,7 +4,7 @@ Matt"> Zimmerman"> - 2013/09/18"> + 2021/08/31"> 1"> @@ -27,7 +27,7 @@ &dhsurname; - 2002-2005, 2011-2013 + 2002-2005, 2011-2021 &dhusername; &dhdate; @@ -480,7 +480,7 @@ #, =# - Specify the block size in samples. Subset streams must use one of 192, 576, 1152, 2304, 4608, 256, 512, 1024, 2048, 4096 (and 8192 or 16384 if the sample rate is >48kHz). + Specify the blocksize in samples. The default is 1152 for -l 0, else 4096. For subset streams this must be <= 4608 if the samplerate <= 48kHz, for subset streams with higher samplerates it must be <= 16384. @@ -511,7 +511,7 @@ , - Synonymous with -l 0 -b 1152 -r 3 + Synonymous with -l 0 -b 1152 -r 3 --no-mid-side @@ -535,7 +535,7 @@ , - Synonymous with -l 6 -b 4096 -r 4 + Synonymous with -l 6 -b 4096 -r 4 --no-mid-side @@ -567,7 +567,7 @@ , - Synonymous with -l 8 -b 4096 -m -e -r 6 -A tukey(0.5) -A partial_tukey(2) + Synonymous with -l 12 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2) @@ -575,7 +575,7 @@ , - Synonymous with -l 12 -b 4096 -m -e -r 6 -A tukey(0.5) -A partial_tukey(2) -A punchout_tukey(3) + Synonymous with -l 12 -b 4096 -m -r 6 -A tukey(0.5) -A partial_tukey(2) -A punchout_tukey(3) diff --git a/src/flac/main.c b/src/flac/main.c index 067e2822..2946168f 100644 --- a/src/flac/main.c +++ b/src/flac/main.c @@ -1569,14 +1569,16 @@ void show_explain(void) printf(" block of 8192 bytes by default, or 65536 bytes\n"); printf(" if the input audio is more than 20 minutes long.\n"); printf(" -b, --blocksize=# Specify the blocksize in samples; the default is\n"); - printf(" 1152 for -l 0, else 4096; must be one of 192,\n"); - printf(" 576, 1152, 2304, 4608, 256, 512, 1024, 2048,\n"); - printf(" 4096 (and 8192 or 16384 if the sample rate is\n"); - printf(" >48kHz) for Subset streams.\n"); + printf(" 1152 for -l 0, else 4096; for subset streams this\n"); + printf(" must be <= 4608 if the samplerate <= 48kHz,\n"); + printf(" for subset streams with a higher samplerates it\n"); + printf(" must be <= 16384.\n"); printf(" -0, --compression-level-0, --fast Synonymous with -l 0 -b 1152 -r 3\n"); + printf(" --no-mid-side\n"); printf(" -1, --compression-level-1 Synonymous with -l 0 -b 1152 -M -r 3\n"); printf(" -2, --compression-level-2 Synonymous with -l 0 -b 1152 -m -r 3\n"); printf(" -3, --compression-level-3 Synonymous with -l 6 -b 4096 -r 4\n"); + printf(" --no-mid-side\n"); printf(" -4, --compression-level-4 Synonymous with -l 8 -b 4096 -M -r 4\n"); printf(" -5, --compression-level-5 Synonymous with -l 8 -b 4096 -m -r 5\n"); printf(" -5 is the default setting\n");