From 1f77fea97f8ca10eed12c0121913fe4c2a12f9c1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Steffen=20M=C3=BCller?= <steffen.mueller@radio-frei.de>
Date: Sat, 20 Feb 2021 19:11:43 +0100
Subject: [PATCH] - remove bufferize parameter from input.alsa and output.alsa
 - minor changes on comments in *.ini

---
 config/sample-development.engine-core.ini | 4 ++--
 config/sample-docker.engine-core.ini      | 4 ++--
 config/sample-production.engine-core.ini  | 4 ++--
 src/library.liq                           | 6 +++---
 tests/test_alsa_mixer.liq                 | 4 ++--
 tests/test_alsa_settings.liq              | 4 ++--
 6 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/config/sample-development.engine-core.ini b/config/sample-development.engine-core.ini
index 338398c..72740c0 100644
--- a/config/sample-development.engine-core.ini
+++ b/config/sample-development.engine-core.ini
@@ -38,7 +38,7 @@ fallback_threshold="-80."
 [soundcard]
 # Choose your weapon: "alsa" (1 input/output), "pulseaudio" (multi input/output) or "jack" (multi input/output)
 soundsystem="alsa"
-# With 'alsa' you have to write the devicenames like 'hw:0' or 'default' to use the system default
+# With 'alsa' you have to write the devicenames like 'default' to use the system default or 'hw:0' to use the 1st audio device directly.
 # With Pulse Audio and Jack => an non empty value means it is used
 # Devices with empty string are ignored and not used
 input_device_0="default"
@@ -55,7 +55,7 @@ output_device_4=""
 
 # If you are using ALSA, you might need to tweak these values if you're hearing jitter, cracklings or other artifacts
 
-# Set to 0 to use the ALSA default.
+# Set to 0 to use the ALSA default. If using hardware directly (hw:0) start with 8192. Higher Valus gives heigher latency and lower CPU usage.
 alsa_buffer="0"
 # Only used for buffered ALSA I/O, and affects latency. Probably not wanted for live audio. Defaults to "1"
 alsa_buffer_length="0"
diff --git a/config/sample-docker.engine-core.ini b/config/sample-docker.engine-core.ini
index 4fd8b65..24b9fe7 100644
--- a/config/sample-docker.engine-core.ini
+++ b/config/sample-docker.engine-core.ini
@@ -38,7 +38,7 @@ fallback_threshold="-80."
 [soundcard]
 # Choose your weapon: "alsa" (1 input/output), "pulseaudio" (multi input/output) or "jack" (multi input/output)
 soundsystem="alsa"
-# With 'alsa' you have to write the devicenames like 'hw:0' or 'default' to use the system default
+# With 'alsa' you have to write the devicenames like 'default' to use the system default or 'hw:0' to use the 1st audio device directly.
 # With Pulse Audio and Jack => an non empty value means it is used
 # Devices with empty string are ignored and not used
 input_device_0="default"
@@ -55,7 +55,7 @@ output_device_4=""
 
 # If you are using ALSA, you might need to tweak these values if you're hearing jitter, cracklings or other artifacts
 
-# Set to 0 to use the ALSA default.
+# Set to 0 to use the ALSA default. If using hardware directly (hw:0) start with 8192. Higher Valus gives heigher latency and lower CPU usage.
 alsa_buffer="0"
 # Only used for buffered ALSA I/O, and affects latency. Probably not wanted for live audio. Defaults to "1"
 alsa_buffer_length="0"
diff --git a/config/sample-production.engine-core.ini b/config/sample-production.engine-core.ini
index 338398c..72740c0 100644
--- a/config/sample-production.engine-core.ini
+++ b/config/sample-production.engine-core.ini
@@ -38,7 +38,7 @@ fallback_threshold="-80."
 [soundcard]
 # Choose your weapon: "alsa" (1 input/output), "pulseaudio" (multi input/output) or "jack" (multi input/output)
 soundsystem="alsa"
-# With 'alsa' you have to write the devicenames like 'hw:0' or 'default' to use the system default
+# With 'alsa' you have to write the devicenames like 'default' to use the system default or 'hw:0' to use the 1st audio device directly.
 # With Pulse Audio and Jack => an non empty value means it is used
 # Devices with empty string are ignored and not used
 input_device_0="default"
@@ -55,7 +55,7 @@ output_device_4=""
 
 # If you are using ALSA, you might need to tweak these values if you're hearing jitter, cracklings or other artifacts
 
-# Set to 0 to use the ALSA default.
+# Set to 0 to use the ALSA default. If using hardware directly (hw:0) start with 8192. Higher Valus gives heigher latency and lower CPU usage.
 alsa_buffer="0"
 # Only used for buffered ALSA I/O, and affects latency. Probably not wanted for live audio. Defaults to "1"
 alsa_buffer_length="0"
diff --git a/src/library.liq b/src/library.liq
index 8791b53..8c78871 100644
--- a/src/library.liq
+++ b/src/library.liq
@@ -121,7 +121,7 @@ end
 
 def set_input(device, name) =
     if use_alsa == true then
-        alsa_in = input.alsa(id=name, device=a0_in, clock_safe=false, bufferize = false)
+        alsa_in = input.alsa(id=name, device=a0_in, clock_safe=false)
         inputs := list.append([alsa_in], !inputs)
 
     elsif use_jack == true then
@@ -143,9 +143,9 @@ def get_output(source, device, name) =
         if use_alsa == true then
             log("--- Set ALSA Output ---")
             if device == "default" then
-                output.alsa(id="lineout", bufferize = false, source)
+                output.alsa(id="lineout", source)
             else
-                output.alsa(id=name, device=device, bufferize = false, source)
+                output.alsa(id=name, device=device, source)
             end
         elsif use_jack == true then
             log("--- Set JACK AUDIO Output ---")
diff --git a/tests/test_alsa_mixer.liq b/tests/test_alsa_mixer.liq
index 735b269..14bb9fb 100644
--- a/tests/test_alsa_mixer.liq
+++ b/tests/test_alsa_mixer.liq
@@ -38,11 +38,11 @@ set("alsa.alsa_buffer", 8192) # 7168) # 6144) # 8192) # 10240) #15876
 set("alsa.buffer_length", 25)
 set("alsa.periods", 0) # assertion error when setting periods other than 0 => alsa default
 
-input_linein = input.alsa(id="linein", bufferize = false)
+input_linein = input.alsa(id="linein")
 #input_fs = single(id="fs", "/var/audio/fallback/output.flac")
 #input_http = input.http(id="http", "http://stream.fro.at/fro-128.ogg")
 
 #mixer = mix(id="mixer", [input_fs, input_http, input_linein])
 
-#output.alsa(id="lineout", bufferize = false, mixer)
+#output.alsa(id="lineout", mixer)
 
diff --git a/tests/test_alsa_settings.liq b/tests/test_alsa_settings.liq
index f1a4490..49cf60b 100644
--- a/tests/test_alsa_settings.liq
+++ b/tests/test_alsa_settings.liq
@@ -33,7 +33,7 @@ set("alsa.alsa_buffer", 8192)
 set("alsa.buffer_length", 25)
 set("alsa.periods", 0) # assertion error when setting periods other than 0 => alsa default
 
-#input_linein = input.alsa(id="linein", bufferize = false)
+#input_linein = input.alsa(id="linein")
 
 audio1 = single(id="fs1", "./sources/1.flac")
 audio2 = single(id="fs2", "./sources/2.flac")
@@ -44,5 +44,5 @@ audio2 = single(id="fs2", "./sources/2.flac")
 #mixer = mix(id="mixer", [input_fs, input_http, input_linein])
 
 mixed = add([audio1, audio2])
-output.alsa(id="lineout", bufferize = false, mixed)
+output.alsa(id="lineout", mixed)
 
-- 
GitLab