]> git.alsa-project.org Git - alsa-utils.git/commitdiff
alsaloop: parse_config(): handle short form -B / -E options
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 7 Jan 2026 10:51:18 +0000 (11:51 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 25 May 2026 09:54:34 +0000 (11:54 +0200)
The usage info documents both short and long form arguments for these:

"-B,--buffer    buffer size in frames\n"
"-E,--period    period size in frames\n"

But the short form was missing from the optstring so it wasn't accepted:

alsaloop -B 123 -E 42
alsaloop: invalid option -- 'B'
alsaloop: invalid option -- 'E'

Fix that.

Closes: https://github.com/alsa-project/alsa-utils/pull/317
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
alsaloop/alsaloop.c

index 51fb64626a9095b3063b1aa5ee6598c4213ea2ff..e0911b0bfff4332caf87d1907f33fee7c1ca54e0 100644 (file)
@@ -425,7 +425,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output,
        while (1) {
                int c;
                if ((c = getopt_long(argc, argv,
-                               "hdg:P:C:X:Y:x:l:t:F:f:c:r:s:benvA:S:a:m:T:O:w:UW:z",
+                               "hdg:P:C:X:Y:x:l:t:F:f:c:r:B:E:s:benvA:S:a:m:T:O:w:UW:z",
                                long_option, NULL)) < 0)
                        break;
                switch (c) {