From 2f498b0f5b36ea66b537a74bbc6ef98de82659fd Mon Sep 17 00:00:00 2001
From: Ivica Ico Bukvic <ico@vt.edu>
Date: Fri, 27 Jun 2014 18:47:33 -0400
Subject: [PATCH] *further refined s_audio's sample rate detection in the
 -nogui mode

---
 pd/src/s_audio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pd/src/s_audio.c b/pd/src/s_audio.c
index 6489de504..0a479c664 100644
--- a/pd/src/s_audio.c
+++ b/pd/src/s_audio.c
@@ -521,7 +521,7 @@ t_float sys_getsr(void)
     // proper sample rate entered. Hence we check for this here and avoid
     // the -nogui nonsense where we have to do various workarounds to make
     // sure that audio objects that depend on this call get the proper sr
-    if (sys_dacsr == 0)
+    if (sys_dacsr == 0 && audio_rate > 0)
     {
         sys_dacsr = (t_float)audio_rate;
     }
-- 
GitLab