emscripten-core / emscripten

Emscripten: An LLVM-to-WebAssembly Compiler
Other
25.36k stars 3.25k forks source link

Important bugfixes to OpenAL implementation. #22073

Closed geneotech closed 3 weeks ago

geneotech commented 3 weeks ago
geneotech commented 3 weeks ago

Hello! Do you mean for AL_SOURCE_DISTANCE_MODEL? I'm afraid the other issues are too complex to be easily reproduced in a simple test.

sbc100 commented 3 weeks ago

Hello! Do you mean for AL_SOURCE_DISTANCE_MODEL? I'm afraid the other issues are too complex to be easily reproduced in a simple test.

Whatever can be reasonably tested should be yes. Perhaps the first 2 parts of this change at least should be fairly straight forward to test?

sbc100 commented 3 weeks ago

In fact, I wonder if we can split out the updateSourceTime into its own PR, since it seems a little more complex, and worthy of some deeper analysis, whereas the other two fixes look trivial.

For the updateSourceTime issue in particalar I'd be interested to know which of the assignments to src.bufOffset causes is used when its is NaN. Are you able to catch it in devtools? Can you see which of the three branches in updateSourceTime that assigned to bufOutput were taken?

geneotech commented 3 weeks ago

Thank you! This test to alDisable/alEnable/alIsEnabled should cover it, the panning still seems to work. As for the audiobuf typo, I'm really not sure how to cover it because the implications of the typo being there are really somewhat complex.

I'll make the separate PR with updateSourceTime only once I find the real cause.