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
11
3rd Party Plugins - (fb2k) / Re: NEW ESLyric v0.5 - an alternative lyric show component
Last post by Defender -
Sorry should have said I already use ESlyrics 0.5.4.1028.  And I guess you don't want me to downgrade.
I'm just referencing the changelog for one of the versions and not asking you to downgrade the version.
Yeah, I was a bit confused to saw a reference to an older version and a link with only information in Chinese which google translate could not do anything with.

DeepL (which I never heard of) sorted that, so I'm all good now.

Thx for your help.
12
3rd Party Plugins - (fb2k) / Re: foo_truepeak True Peak Scanner
Last post by Defender -
That's exactly my point:  "TF doesn't work with floats in a natural way without 40 lines of code", not sure what's your point showing exactly what I said xd We already know it "can be done" and anyway you are using integers in the end.

Doing all that every-time you have to operate with 1 float number is ridiculous (what about needing 10?)
I'm using this TF code not in a PSS splitter but within ELP.
In ELP I can define "functions". I created a couple of generic functions I can call wherever I want within all different elements of ELP.  This also makes it possible to exceed the 30k code limitation per ELP element. So I really don't care how much code I need for generic multi-purpose functions, since they are only defined in a single place.

I don't find that ridiculous, but quite efficient. I do find this whole discussion OT.
18
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
20
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".