Closed diemildefreude closed 4 months ago
I assume that this is with AudioWorklet. What if you force using AudioLib, does it give the same result?
You can do this by setting this variable to false
: https://github.com/Wasted-Audio/hvcc/blob/develop/hvcc/generators/c2js/template/hv_wrapper.js#L3
Yeah, I'm getting the same bug with ScriptProcessorNode/audiolib too.
Also, once it happens, I can't turn off the audio with the generated index.html's start/stop transport (loader.stop() call). The high pitch remains.
OK, as you requested (on Discord), I've tested it in Chrome and the same bug happens as in Edge. However, I've also discovered that this is bug was happening only when using the bluetooth connection of my Bose QC 35 II headphones. It does not happen when plugging the headphones directly into the computer's headphone jack or when using the laptop's speakers. I then tested it with another bluetooth device (a little Anker speaker) and the bug does not occur with that either.
I don't know much about Bluetooth audio, but apparently it overrides any sound cards you have with its own compression algorithm.
So this is a bug specific to using heavy's js implementation with the Bose QC 35 II's bluetooth (and presumably any other Bluetooth devices that share the same bluetooth sound-processor as it). And it happens in Edge and Chrome but not in Firefox. Oof.
Hmm, that's one very strange bug and not sure if it's something that we can really do anything about.
With a simple patch of just
[noise~]->[*~]->[dac~]
, with[*~]
taking a volume value, if the volume is set to 1.0, the noise immediately changes into something like a sustained, very high-pitched sine wave. If the volume is set to 0.9, the same thing happens, but it takes around 10 seconds of noise before the change occurs. 0.5 is stable and doesn't produce this bug.Firefox does not have this problem.