How the Desktop OpenAL-Soft works in the browser using WebAssembly?
-
wrote on 8 Jul 2024, 22:24 last edited by 8Observer8 7 Aug 2024, 22:54
I was very surprised that it works. Please, explain how is it possible that OpenAL Soft that was build for Desktop works in the browser? Why it doesn't print
unknown file type
forlibOpenAL32.dll.a
when compiling? Why doesn't it show a message thatOpenAL32.dll was not found
? But OpenAL-Soft works in the browser using Qt! I just have set up it like this:CONFIG("windows") { INCLUDEPATH += $$PWD/libs/openal-soft-1.23.1-mingw-64-bit/include LIBS += -L$$PWD/libs/openal-soft-1.23.1-mingw-64-bit/lib/x64 LIBS += -lOpenAL32.dll }
It works for Desktop and WebAssembly without any changes. I just tried to build Desktop demo to WebAssembly to see what errors in will show for OpenAL Soft but it works! You can run my following my demo on itch and click on the sound button on the right button corner.
-
-
wrote on 8 Jul 2024, 23:01 last edited by 8Observer8 7 Aug 2024, 23:06
When building in WASM, what is inside this section is ignored: CONFIG("windows"). Used OpenAL browser implementation using Emscripten: https://emscripten.org/docs/porting/Audio.html All code written in OpenAL, without the need for changes on the part of the programmer, is compiled into WASM. Now it is clear.
1/2