From f5c806a75ee53db6a690ade7281bfa6eaea9aeb9 Mon Sep 17 00:00:00 2001 From: Amateur Audio Dude <168192910+AmateurAudioDude@users.noreply.github.com> Date: Fri, 5 Sep 2025 02:42:38 +1000 Subject: [PATCH] parsing parameters no longer required --- server/stream/3las.server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/stream/3las.server.js b/server/stream/3las.server.js index 9893203..43c8855 100644 --- a/server/stream/3las.server.js +++ b/server/stream/3las.server.js @@ -339,6 +339,7 @@ const OptionParser = { "-channels": function (txt) { return parseInt(txt, 10); }, "-samplerate": function (txt) { return parseInt(txt, 10); } }; +/* Parsing parameters no longer required for Server variable but we'll keep the old code here as a reference const Options = {}; // Parse parameters for (let i = 2; i < (process.argv.length - 1); i += 2) { @@ -348,7 +349,9 @@ for (let i = 2; i < (process.argv.length - 1); i += 2) { throw new Error("Redefined argument: '" + process.argv[i] + "'. Please use '" + process.argv[i] + "' only ONCE"); Options[process.argv[i]] = OptionParser[process.argv[i]](process.argv[i + 1]); } - const Server = new StreamServer(null, 2, 48000); +*/ + const audioChannels = serverConfig.audio.audioChannels || 2; + const Server = new StreamServer(null, audioChannels, 48000); ServerInstance = Server;