It seems that $delay was negative after unpausing because $loops wasn't getting incremented while the stream is paused. This unexpected side effect seemed to be cause the issue. My """fix""" bypassed $loops which is why it seemed to worked but I neglected to test on windows (woops). This new fix however was tested on Windows and Linux. I also had the person who said my original """fix""" broke audio streams test it and they said it works. Note the second commit was me removing some test properties I created in my many many attempts to fix this.
It seems that $delay was negative after unpausing because $loops wasn't getting incremented while the stream is paused. This unexpected side effect seemed to be cause the issue. My """fix""" bypassed $loops which is why it seemed to worked but I neglected to test on windows (woops). This new fix however was tested on Windows and Linux. I also had the person who said my original """fix""" broke audio streams test it and they said it works. Note the second commit was me removing some test properties I created in my many many attempts to fix this.