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
1
MP3 - General / Re: Resurrecting/Preserving the Helix MP3 encoder
Last post by maikmerten -
@Case That patch seems to work well (tested 44100 to 32000, 22050, 24000 and 16000). I'm baffled at how consistently you find your way through that codebase, I was still trying to find out how the samples get passed around. Impressive!

GCC warns a bit about declarations (I assume that's referring to your changes in a header file), but I guess I can try figuring that one out...

Code: [Select]
./hmp3/src/pub/srcc.h:85:7: warning: type ‘struct Csrc’ violates the C++ One Definition Rule [-Wodr]
   85 | class Csrc
      |       ^
./hmp3/src/pub/srcc.h:85:7: note: a different type is defined in another translation unit
   85 | class Csrc
      |       ^
./hmp3/src/pub/srcc.h:107:11: note: the first difference of corresponding definitions is field ‘itof_buf’
  107 |     int gen_src_filter ( int source0, int target );
      |           ^
./hmp3/src/pub/srcc.h:103:41: note: a field with different name is defined in another translation unit
  103 |     int m_channels, m_bits, m_is_float, m_frames_to_convert;
      |                                         ^
./hmp3/src/pub/srcc.h:110:9: warning: type of ‘src_filter_mono_case0’ does not match original declaration [-Wlto-type-mismatch]
  110 |     int src_filter_mono_case0 ( float x[], float y[] );
      |         ^
hmp3/src/srccf.cpp:68:1: note: ‘src_filter_mono_case0’ was previously declared here
   68 | Csrc::src_filter_mono_case0 ( float x[], float y[] )
      | ^
hmp3/src/srccf.cpp:68:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:111:9: warning: type of ‘src_filter_mono_case1’ does not match original declaration [-Wlto-type-mismatch]
  111 |     int src_filter_mono_case1 ( float x[], float y[] );
      |         ^
hmp3/src/srccf.cpp:80:1: note: ‘src_filter_mono_case1’ was previously declared here
   80 | Csrc::src_filter_mono_case1 ( float x[], float y[] )
      | ^
hmp3/src/srccf.cpp:80:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:112:9: warning: type of ‘src_filter_mono_case2’ does not match original declaration [-Wlto-type-mismatch]
  112 |     int src_filter_mono_case2 ( float x[], float y[] );
      |         ^
hmp3/src/srccf.cpp:104:1: note: ‘src_filter_mono_case2’ was previously declared here
  104 | Csrc::src_filter_mono_case2 ( float x[], float y[] )
      | ^
hmp3/src/srccf.cpp:104:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:113:9: warning: type of ‘src_filter_mono_case3’ does not match original declaration [-Wlto-type-mismatch]
  113 |     int src_filter_mono_case3 ( float x[], float y[] );
      |         ^
hmp3/src/srccf.cpp:131:1: note: ‘src_filter_mono_case3’ was previously declared here
  131 | Csrc::src_filter_mono_case3 ( float x[], float y[] )
      | ^
hmp3/src/srccf.cpp:131:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:114:9: warning: type of ‘src_filter_mono_case4’ does not match original declaration [-Wlto-type-mismatch]
  114 |     int src_filter_mono_case4 ( float x[], float y[] );
      |         ^
hmp3/src/srccf.cpp:196:1: note: ‘src_filter_mono_case4’ was previously declared here
  196 | Csrc::src_filter_mono_case4 ( float x[], float y[] )
      | ^
hmp3/src/srccf.cpp:196:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:116:9: warning: type of ‘src_filter_dual_case0’ does not match original declaration [-Wlto-type-mismatch]
  116 |     int src_filter_dual_case0 ( float x[], float y[] );
      |         ^
hmp3/src/srccf.cpp:246:1: note: ‘src_filter_dual_case0’ was previously declared here
  246 | Csrc::src_filter_dual_case0 ( float x[], float y[] )
      | ^
hmp3/src/srccf.cpp:246:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:117:9: warning: type of ‘src_filter_dual_case1’ does not match original declaration [-Wlto-type-mismatch]
  117 |     int src_filter_dual_case1 ( float x[][2], float y[][2] );
      |         ^
hmp3/src/srccf.cpp:258:1: note: ‘src_filter_dual_case1’ was previously declared here
  258 | Csrc::src_filter_dual_case1 ( float x[][2], float y[][2] )
      | ^
hmp3/src/srccf.cpp:258:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:118:9: warning: type of ‘src_filter_dual_case2’ does not match original declaration [-Wlto-type-mismatch]
  118 |     int src_filter_dual_case2 ( float x[][2], float y[][2] );
      |         ^
hmp3/src/srccf.cpp:280:1: note: ‘src_filter_dual_case2’ was previously declared here
  280 | Csrc::src_filter_dual_case2 ( float x[][2], float y[][2] )
      | ^
hmp3/src/srccf.cpp:280:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:119:9: warning: type of ‘src_filter_dual_case3’ does not match original declaration [-Wlto-type-mismatch]
  119 |     int src_filter_dual_case3 ( float x[][2], float y[][2] );
      |         ^
hmp3/src/srccf.cpp:312:1: note: ‘src_filter_dual_case3’ was previously declared here
  312 | Csrc::src_filter_dual_case3 ( float x[][2], float y[][2] )
      | ^
hmp3/src/srccf.cpp:312:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:120:9: warning: type of ‘src_filter_dual_case4’ does not match original declaration [-Wlto-type-mismatch]
  120 |     int src_filter_dual_case4 ( float x[][2], float y[][2] );
      |         ^
hmp3/src/srccf.cpp:396:1: note: ‘src_filter_dual_case4’ was previously declared here
  396 | Csrc::src_filter_dual_case4 ( float x[][2], float y[][2] )
      | ^
hmp3/src/srccf.cpp:396:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:122:9: warning: type of ‘src_filter_to_mono_case0’ does not match original declaration [-Wlto-type-mismatch]
  122 |     int src_filter_to_mono_case0 ( float x[][2], float y[] );
      |         ^
hmp3/src/srccf.cpp:458:1: note: ‘src_filter_to_mono_case0’ was previously declared here
  458 | Csrc::src_filter_to_mono_case0 ( float x[][2], float y[] )
      | ^
hmp3/src/srccf.cpp:458:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:123:9: warning: type of ‘src_filter_to_mono_case1’ does not match original declaration [-Wlto-type-mismatch]
  123 |     int src_filter_to_mono_case1 ( float x[][2], float y[] );
      |         ^
hmp3/src/srccf.cpp:472:1: note: ‘src_filter_to_mono_case1’ was previously declared here
  472 | Csrc::src_filter_to_mono_case1 ( float x[][2], float y[] )
      | ^
hmp3/src/srccf.cpp:472:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:124:9: warning: type of ‘src_filter_to_mono_case2’ does not match original declaration [-Wlto-type-mismatch]
  124 |     int src_filter_to_mono_case2 ( float x[][2], float y[] );
      |         ^
hmp3/src/srccf.cpp:496:1: note: ‘src_filter_to_mono_case2’ was previously declared here
  496 | Csrc::src_filter_to_mono_case2 ( float x[][2], float y[] )
      | ^
hmp3/src/srccf.cpp:496:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:125:9: warning: type of ‘src_filter_to_mono_case3’ does not match original declaration [-Wlto-type-mismatch]
  125 |     int src_filter_to_mono_case3 ( float x[][2], float y[] );
      |         ^
hmp3/src/srccf.cpp:526:1: note: ‘src_filter_to_mono_case3’ was previously declared here
  526 | Csrc::src_filter_to_mono_case3 ( float x[][2], float y[] )
      | ^
hmp3/src/srccf.cpp:526:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:126:9: warning: type of ‘src_filter_to_mono_case4’ does not match original declaration [-Wlto-type-mismatch]
  126 |     int src_filter_to_mono_case4 ( float x[][2], float y[] );
      |         ^
hmp3/src/srccf.cpp:597:1: note: ‘src_filter_to_mono_case4’ was previously declared here
  597 | Csrc::src_filter_to_mono_case4 ( float x[][2], float y[] )
      | ^
hmp3/src/srccf.cpp:597:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:129:9: warning: type of ‘src_bfilter_mono_case0’ does not match original declaration [-Wlto-type-mismatch]
  129 |     int src_bfilter_mono_case0 ( unsigned char x[], float y[] );
      |         ^
hmp3/src/srccfb.cpp:68:1: note: ‘src_bfilter_mono_case0’ was previously declared here
   68 | Csrc::src_bfilter_mono_case0 ( unsigned char x[], float y[] )
      | ^
hmp3/src/srccfb.cpp:68:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:130:9: warning: type of ‘src_bfilter_mono_case1’ does not match original declaration [-Wlto-type-mismatch]
  130 |     int src_bfilter_mono_case1 ( unsigned char x[], float y[] );
      |         ^
hmp3/src/srccfb.cpp:80:1: note: ‘src_bfilter_mono_case1’ was previously declared here
   80 | Csrc::src_bfilter_mono_case1 ( unsigned char x[], float y[] )
      | ^
hmp3/src/srccfb.cpp:80:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:131:9: warning: type of ‘src_bfilter_mono_case2’ does not match original declaration [-Wlto-type-mismatch]
  131 |     int src_bfilter_mono_case2 ( unsigned char x[], float y[] );
      |         ^
hmp3/src/srccfb.cpp:104:1: note: ‘src_bfilter_mono_case2’ was previously declared here
  104 | Csrc::src_bfilter_mono_case2 ( unsigned char x[], float y[] )
      | ^
hmp3/src/srccfb.cpp:104:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:132:9: warning: type of ‘src_bfilter_mono_case3’ does not match original declaration [-Wlto-type-mismatch]
  132 |     int src_bfilter_mono_case3 ( unsigned char x[], float y[] );
      |         ^
hmp3/src/srccfb.cpp:134:1: note: ‘src_bfilter_mono_case3’ was previously declared here
  134 | Csrc::src_bfilter_mono_case3 ( unsigned char x[], float y[] )
      | ^
hmp3/src/srccfb.cpp:134:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:133:9: warning: type of ‘src_bfilter_mono_case4’ does not match original declaration [-Wlto-type-mismatch]
  133 |     int src_bfilter_mono_case4 ( unsigned char x[], float y[] );
      |         ^
hmp3/src/srccfb.cpp:203:1: note: ‘src_bfilter_mono_case4’ was previously declared here
  203 | Csrc::src_bfilter_mono_case4 ( unsigned char x[], float y[] )
      | ^
hmp3/src/srccfb.cpp:203:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:135:9: warning: type of ‘src_bfilter_dual_case0’ does not match original declaration [-Wlto-type-mismatch]
  135 |     int src_bfilter_dual_case0 ( unsigned char x[][2], float y[][2] );
      |         ^
hmp3/src/srccfb.cpp:252:1: note: ‘src_bfilter_dual_case0’ was previously declared here
  252 | Csrc::src_bfilter_dual_case0 ( unsigned char x[][2], float y[][2] )
      | ^
hmp3/src/srccfb.cpp:252:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:136:9: warning: type of ‘src_bfilter_dual_case1’ does not match original declaration [-Wlto-type-mismatch]
  136 |     int src_bfilter_dual_case1 ( unsigned char x[][2], float y[][2] );
      |         ^
hmp3/src/srccfb.cpp:267:1: note: ‘src_bfilter_dual_case1’ was previously declared here
  267 | Csrc::src_bfilter_dual_case1 ( unsigned char x[][2], float y[][2] )
      | ^
hmp3/src/srccfb.cpp:267:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:137:9: warning: type of ‘src_bfilter_dual_case2’ does not match original declaration [-Wlto-type-mismatch]
  137 |     int src_bfilter_dual_case2 ( unsigned char x[][2], float y[][2] );
      |         ^
hmp3/src/srccfb.cpp:299:1: note: ‘src_bfilter_dual_case2’ was previously declared here
  299 | Csrc::src_bfilter_dual_case2 ( unsigned char x[][2], float y[][2] )
      | ^
hmp3/src/srccfb.cpp:299:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:138:9: warning: type of ‘src_bfilter_dual_case3’ does not match original declaration [-Wlto-type-mismatch]
  138 |     int src_bfilter_dual_case3 ( unsigned char x[][2], float y[][2] );
      |         ^
hmp3/src/srccfb.cpp:335:1: note: ‘src_bfilter_dual_case3’ was previously declared here
  335 | Csrc::src_bfilter_dual_case3 ( unsigned char x[][2], float y[][2] )
      | ^
hmp3/src/srccfb.cpp:335:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:139:9: warning: type of ‘src_bfilter_dual_case4’ does not match original declaration [-Wlto-type-mismatch]
  139 |     int src_bfilter_dual_case4 ( unsigned char x[][2], float y[][2] );
      |         ^
hmp3/src/srccfb.cpp:426:1: note: ‘src_bfilter_dual_case4’ was previously declared here
  426 | Csrc::src_bfilter_dual_case4 ( unsigned char x[][2], float y[][2] )
      | ^
hmp3/src/srccfb.cpp:426:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:141:9: warning: type of ‘src_bfilter_to_mono_case0’ does not match original declaration [-Wlto-type-mismatch]
  141 |     int src_bfilter_to_mono_case0 ( unsigned char x[][2], float y[] );
      |         ^
hmp3/src/srccfb.cpp:486:1: note: ‘src_bfilter_to_mono_case0’ was previously declared here
  486 | Csrc::src_bfilter_to_mono_case0 ( unsigned char x[][2], float y[] )
      | ^
hmp3/src/srccfb.cpp:486:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:142:9: warning: type of ‘src_bfilter_to_mono_case1’ does not match original declaration [-Wlto-type-mismatch]
  142 |     int src_bfilter_to_mono_case1 ( unsigned char x[][2], float y[] );
      |         ^
hmp3/src/srccfb.cpp:502:1: note: ‘src_bfilter_to_mono_case1’ was previously declared here
  502 | Csrc::src_bfilter_to_mono_case1 ( unsigned char x[][2], float y[] )
      | ^
hmp3/src/srccfb.cpp:502:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:143:9: warning: type of ‘src_bfilter_to_mono_case2’ does not match original declaration [-Wlto-type-mismatch]
  143 |     int src_bfilter_to_mono_case2 ( unsigned char x[][2], float y[] );
      |         ^
hmp3/src/srccfb.cpp:527:1: note: ‘src_bfilter_to_mono_case2’ was previously declared here
  527 | Csrc::src_bfilter_to_mono_case2 ( unsigned char x[][2], float y[] )
      | ^
hmp3/src/srccfb.cpp:527:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:144:9: warning: type of ‘src_bfilter_to_mono_case3’ does not match original declaration [-Wlto-type-mismatch]
  144 |     int src_bfilter_to_mono_case3 ( unsigned char x[][2], float y[] );
      |         ^
hmp3/src/srccfb.cpp:559:1: note: ‘src_bfilter_to_mono_case3’ was previously declared here
  559 | Csrc::src_bfilter_to_mono_case3 ( unsigned char x[][2], float y[] )
      | ^
hmp3/src/srccfb.cpp:559:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:145:9: warning: type of ‘src_bfilter_to_mono_case4’ does not match original declaration [-Wlto-type-mismatch]
  145 |     int src_bfilter_to_mono_case4 ( unsigned char x[][2], float y[] );
      |         ^
hmp3/src/srccfb.cpp:629:1: note: ‘src_bfilter_to_mono_case4’ was previously declared here
  629 | Csrc::src_bfilter_to_mono_case4 ( unsigned char x[][2], float y[] )
      | ^
hmp3/src/srccfb.cpp:629:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:98:12: warning: type of ‘sr_convert’ does not match original declaration [-Wlto-type-mismatch]
   98 |   private:
      |            ^
hmp3/src/srcc.cpp:798:1: note: ‘sr_convert’ was previously declared here
  798 | Csrc::sr_convert ( unsigned char xin[], float yout[] )
      | ^
hmp3/src/srcc.cpp:798:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:89:5: warning: type of ‘__ct_comp ’ does not match original declaration [-Wlto-type-mismatch]
   89 |     Csrc();
      |     ^
hmp3/src/srcc.cpp:65:1: note: ‘__ct_comp ’ was previously declared here
   65 | Csrc::Csrc (  ):
      | ^
hmp3/src/srcc.cpp:65:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:95:9: warning: type of ‘sr_convert_init’ does not match original declaration [-Wlto-type-mismatch]
   95 |     IN_OUT sr_convert ( unsigned char xin[], float yout[] );
      |         ^
hmp3/src/srcc.cpp:730:1: note: ‘sr_convert_init’ was previously declared here
  730 | Csrc::sr_convert_init ( int source, int channels, int bits, int is_float,
      | ^
hmp3/src/srcc.cpp:730:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:91:5: warning: type of ‘__dt_comp ’ does not match original declaration [-Wlto-type-mismatch]
   91 |
      |     ^
hmp3/src/srcc.cpp:70:1: note: ‘__dt_comp ’ was previously declared here
   70 | Csrc::~Csrc()
      | ^
hmp3/src/srcc.cpp:70:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
./hmp3/src/pub/srcc.h:91:5: warning: type of ‘__dt_base ’ does not match original declaration [-Wlto-type-mismatch]
   91 |
      |     ^
hmp3/src/srcc.cpp:70:1: note: ‘__dt_base ’ was previously declared here
   70 | Csrc::~Csrc()
      | ^
hmp3/src/srcc.cpp:70:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
2
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.
3
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.
9
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