diff mbox series

alsaloop: fixed parsing value 'auto' of option 'sync'

Message ID 20211013120049.51047-1-pavel.hofman@ivitera.com (mailing list archive)
State New, archived
Headers show
Series alsaloop: fixed parsing value 'auto' of option 'sync' | expand

Commit Message

Pavel Hofman Oct. 13, 2021, noon UTC
The value 'auto' was not checked which resulted in using
SYNC_TYPE_NONE instead of SYNC_TYPE_AUTO.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
---
 alsaloop/alsaloop.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jaroslav Kysela Oct. 13, 2021, 12:05 p.m. UTC | #1
On 13. 10. 21 14:00, Pavel Hofman wrote:
> The value 'auto' was not checked which resulted in using
> SYNC_TYPE_NONE instead of SYNC_TYPE_AUTO.

Applied. Thank you.

				Jaroslav
diff mbox series

Patch

diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c
index 4192712..f5f2e37 100644
--- a/alsaloop/alsaloop.c
+++ b/alsaloop/alsaloop.c
@@ -528,6 +528,8 @@  static int parse_config(int argc, char *argv[], snd_output_t *output,
 				arg_sync = SYNC_TYPE_PLAYRATESHIFT;
 			else if (optarg[0] == 'r')
 				arg_sync = SYNC_TYPE_SAMPLERATE;
+			else if (optarg[0] == 'a')
+				arg_sync = SYNC_TYPE_AUTO;
 			else
 				arg_sync = atoi(optarg);
 			if (arg_sync < 0 || arg_sync > SYNC_TYPE_LAST)