Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Recent Posts
4
3rd Party Plugins - (fb2k) / Re: Georgia-ReBORN - A Clean foobar2000 Theme
Last post by TT -
@regor,

it seems there is nothing we can do on our side:
Code: [Select]
let activeRequests = [];
let isSafeToExit = false;

function checkAndExit() {
if (isSafeToExit && activeRequests.length === 0) {
fb.Exit();
} else {
setTimeout(checkAndExit, 100);
}
}

function bioOnStateChange(resolve, reject, func = null) { // credit regorxxx
if (this !== null) { // this is xmlhttp bound
if (this.Status === 200) {
return func ? func(this.ResponseText, this) : resolve(this.ResponseText);
} else if (!func) { return reject(this.ResponseText); }
} else if (!func) { return reject({ status: 408, responseText: this.ResponseText }) } // 408 Request Timeout
return null;
}

// May be used to async run a func for the response or as promise
function bioSend({ method = 'GET', URL, body = void (0), func = null, requestHeader = [], bypassCache = false, timeout = 5000 }) { // credit regorxxx
return new Promise((resolve, reject) => {
fb.RunMainMenuCommand('View/Console');
const xmlhttp = new ActiveXObject('WinHttp.WinHttpRequest.5.1');
// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#bypassing_the_cache
// Add ('&' + new Date().getTime()) to URLS to avoid caching
activeRequests.push(xmlhttp); // Add to active requests list

xmlhttp.Open(method, URL + (bypassCache ? (/\\?/.test(URL) ? '&' : '?') + new Date().getTime() : ''), true);
requestHeader.forEach((pair) => {
if (!pair[0] || !pair[1]) {
console.log(`HTTP Headers missing: ${pair}`);
return;
}
xmlhttp.SetRequestHeader(...pair);
});

if (bypassCache) {
xmlhttp.SetRequestHeader('Cache-Control', 'private');
xmlhttp.SetRequestHeader('Pragma', 'no-cache');
xmlhttp.SetRequestHeader('cache', 'no-store');
xmlhttp.SetRequestHeader('If-Modified-Since', 'Sat, 1 Jan 2000 00:00:00 GMT');
}

xmlhttp.SetTimeouts(timeout, timeout, timeout, timeout);
xmlhttp.Send(method === 'POST' ? body : void (0));

const timer = setTimeout(() => {
try {
xmlhttp.WaitForResponse(-1);
bioOnStateChange.call(xmlhttp, resolve, reject, func);
} catch (e) {
xmlhttp.Abort();
reject({ status: 408, responseText: e.message });
} finally {
clearInterval(checkResponse);
activeRequests = activeRequests.filter(req => req !== xmlhttp); // Remove from active requests
}
}, timeout);

const checkResponse = setInterval(() => {
try {
if (xmlhttp.Status && xmlhttp.ResponseText) {
clearTimeout(timer);
clearInterval(checkResponse);
bioOnStateChange.call(xmlhttp, resolve, reject, func);
activeRequests = activeRequests.filter(req => req !== xmlhttp); // Remove from active requests
}
} catch (e) {}
}, 30);
setTimeout(() => { // Simulate foobar exit during request
// Do cleanup
clearTimeout(timer);
clearInterval(checkResponse);

console.log('Aborting all active requests...');
activeRequests.forEach((request, index) => {
try {
console.log(`Aborting request ${index}`);
request.Abort();
console.log(`Request ${index} aborted successfully.`);
} catch (e) {
console.log(`Failed to abort request ${index}:`, e);
}
});
activeRequests = [];
console.log('All requests have been aborted.');

// And exit
isSafeToExit = true;
checkAndExit();
}, 500);
});
}

Log shows everything is cleared:
Code: [Select]
[2024-05-19 15:14:38.321] Aborting all active requests...
[2024-05-19 15:14:38.321] Aborting request 0
[2024-05-19 15:14:38.619] Request 0 aborted successfully.
[2024-05-19 15:14:38.619] All requests have been aborted.
[2024-05-19 15:14:38.635] Shutting down...
[2024-05-19 15:14:38.734] Unloading Script

-TT
5
AAC - General / Re: QAAC: discussion, questions, feature requests, etc.
Last post by phadron -
Solved!  :D  :D  :D

Code: [Select]
ffmpeg -hide_banner -i '.\ENG_L.wav' -i '.\ENG_R.wav' -i '.\ENG_C.wav' -i '.\ENG_LFE.wav' -i '.\ENG_BL.wav' -i '.\ENG_BR.wav' -i '.\ENG_SL.wav' -i '.\ENG_SR.wav' -filter_complex "[0:a][1:a][2:a][3:a][4:a][5:a][6:a][7:a]join=inputs=8:channel_layout=7.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-LFE|4.0-BL|5.0-BR|6.0-SL|7.0-SR[a]" -map "[a]" -acodec pcm_s24le -f wav - | qaac64.exe --chanmask=0x63f -o output.m4a -
7
MP3 - General / Re: Resurrecting/Preserving the Helix MP3 encoder
Last post by maikmerten -
@Case thanks for having a look. An idea why the problem would show up recently? Even with the 16/8-bit-only code one would need many more input samples when downsampling (e.g., three times more when going 48000 down to 16000).

Indeed I think it would probably be rather neat if the PCM reading code would always provide float samples, no matter the original input format. This at least would get rid of the special code for 8-bit samples and shrink the code base a bit.

To be honest, I don't know why RealNetworks has the resampling step within the encoder anyways. I would have imagined the proper place is *between* the WAV reading code and the encoder.

@jaro1 I think in this case, RealNetworks isn't to blame, it's something that broke "recently".
9
MP3 - General / Re: Resurrecting/Preserving the Helix MP3 encoder
Last post by jaro1 -
Thanks for an explanations and all the infos.
Hopefully the problem is not complex and can be solved by implementing some new or correcting an existing command or logic. Unfortunately, this does not automatically mean time savings to solve it..
I'm just surprised that this problem hasn't been fixed in the RealNetworks days and has arrived in the year 2024.. unbelievable. Thought i do not know the genesis of this issue, or if there is an encoder version from the past, that downsamples correctly.
10
MP3 - General / Re: Resurrecting/Preserving the Helix MP3 encoder
Last post by Case -
I have been looking at this issue after you mentioned the downsampling problem. The sr_convert function only converts 1152 frames of audio data to float as that was what I assumed the encoder eats. But the resampler can consume a lot more data. Perhaps the best solution would be to convert all data to float during read.