1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00
This commit is contained in:
NoobishSVK
2024-04-06 00:40:12 +02:00
parent 05c8c641c0
commit 0d71f4437d
13 changed files with 24 additions and 34 deletions

View File

@@ -274,6 +274,7 @@ function handleData(ws, receivedData) {
if((modifiedData / 1000).toFixed(3) == dataToSend.freq) {
resetToDefault(dataToSend);
rdsparser.clear(rds);
dataToSend.af = [];
return; // Prevent tune spamming using scrollwheel
}

View File

@@ -141,15 +141,11 @@ function connectToXdrd() {
authFlags.authMsg = true;
logInfo('Authentication with xdrd successful.');
} else if (line.startsWith('G')) {
const [command, value] = line.split('');
switch (command) {
case 'G':
dataHandler.initialData.eq = value[1];
dataHandler.dataToSend.eq = value[1];
dataHandler.initialData.ims = value[0];
dataHandler.dataToSend.ims = value[0];
break;
}
const value = line.substring(1);
dataHandler.initialData.eq = value.charAt(0);
dataHandler.dataToSend.eq = value.charAt(0);
dataHandler.initialData.ims = value.charAt(1);
dataHandler.dataToSend.ims = value.charAt(1);
} else if (line.startsWith('Z')) {
let modifiedLine = line.slice(1);
dataHandler.initialData.ant = modifiedLine;

View File

@@ -36,7 +36,7 @@ function enableAudioStream() {
childProcess.stderr.on('data', (data) => {
logFfmpeg(`stderr: ${data}`);
if(data.includes('I/O error')) {
logError('Audio device \x1b[35m' + serverConfig.audio.audioDevice + '\x1b[0m failed to start. Start server with the command \x1b[33mnode . --ffmpegdebug \x1b[0mfor more info.')
logError('Audio device \x1b[35m' + serverConfig.audio.audioDevice + '\x1b[0m failed to start. Start server with the command \x1b[33mnode . --ffmpegdebug \x1b[0mfor more info.');
}
if(data.includes('size=') && startupSuccess === false) {
logInfo('Audio stream started up successfully.');