From f9369893ab4c07a7b873fcbc271a7d620e39c24b Mon Sep 17 00:00:00 2001 From: Sam Thursfield <sam@afuera.me.uk> Date: Mon, 20 Jul 2020 10:18:27 +0200 Subject: [PATCH] s_audio_alsa: Only call alsa_checkiosync() if input and output are open As the comment above the alsa_checkiosync() function suggests, there's no sync to be done if we only have an input or an output. --- pd/src/s_audio_alsa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pd/src/s_audio_alsa.c b/pd/src/s_audio_alsa.c index 2cca80e4f..9cbe017d6 100644 --- a/pd/src/s_audio_alsa.c +++ b/pd/src/s_audio_alsa.c @@ -421,7 +421,8 @@ int alsa_send_dacs(void) callno++; #endif - alsa_checkiosync(); /* check I/O are in sync and data not late */ + if (alsa_nindev > 0 && alsa_noutdev > 0) + alsa_checkiosync(); /* check I/O are in sync and data not late */ for (iodev = 0; iodev < alsa_nindev; iodev++) { -- GitLab