emscripten-core / emscripten-core/emscripten
The value of alGetSourcei(_source, AL_BYTE_OFFSET, &sampleBytes); seems not smoothly on playing audio.
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.18 (d5ca9bba6513763d5bdddbd0efff759332bd85d7)
clang version 16.0.0 (https://github.com/llvm/llvm-project 48129cf0ed5053ed3fdf4f928180635e84892614)
Target: wasm32-unknown-emscripten
Thread model: posix
**Situation**
Sorry for my bad English skill...
I am porting my rhythm game to web.
```
ALint sampleBytes;
alGetSourcei(_source, AL_BYTE_OFFSET, &sampleBytes);
```
I calculated the translation of camera by the value - "sampleBytes" to ensure camera offset is sync to playing time of audio.
But it seems not smoothly in the Emscripten version compare to PC version.
I recorded the two versions of video:
[PC on Windows 10](https://www.youtube.com/watch?v=SJy4kbGuEUA)
[Web by Emscripten](https://www.youtube.com/watch?v=T_8Y7TVjGwI)
You can see the problem on the notes, it seems stop-and-go in web version.
I tried to modify the library_openal.js
But I still cannot get it right.
Does anyone know what is the cause of the problem?
Contributor guide
Assessment
This issue has not been assessed yet.