You've already forked fm-dx-webserver
mirror of
https://github.com/KubaPro010/fm-dx-webserver.git
synced 2026-02-27 06:23:53 +01:00
parsing parameters no longer required
This commit is contained in:
committed by
GitHub
parent
70e8295831
commit
f5c806a75e
@@ -339,6 +339,7 @@ const OptionParser = {
|
|||||||
"-channels": function (txt) { return parseInt(txt, 10); },
|
"-channels": function (txt) { return parseInt(txt, 10); },
|
||||||
"-samplerate": 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 = {};
|
const Options = {};
|
||||||
// Parse parameters
|
// Parse parameters
|
||||||
for (let i = 2; i < (process.argv.length - 1); i += 2) {
|
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");
|
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]);
|
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;
|
ServerInstance = Server;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user