Closed oregu1 closed 9 months ago
Your code looks OK on the surface. But looking at your call stack, I can't see anything relating to miniaudio in there? Are you sure this is miniaudio related? How have you determined this is related to miniaudio and not something else in your code?
Your code looks OK on the surface. But looking at your call stack, I can't see anything relating to miniaudio in there? Are you sure this is miniaudio related? How have you determined this is related to miniaudio and not something else in your code?
Thanks for your quick response.
Without invoking sound methods everything works fine without any errors. I've checked it several times commenting code relative to sound initialization and play.
Sanitizer shows this -
wasm streaming compile failed: CompileError: WebAssembly.instantiateStreaming(): Compiling function #23759:"ma_dr_flac__decode_samples_with_residual__rice_..." failed: local count too large @+60197772
@mackron What it could be? I've spent a week trying to figure it out but no success.
I'm not familiar with that error. I've never seen that before nor have I had a report about it so I can't be of much help. However, it looks like some kind of issue with the build environment. Just doing a quick search now, maybe it's related to this? https://github.com/emscripten-core/emscripten/issues/19346
Is this error fixed now that the stack size error is fixed? FYI, I've update the dev branch to default the stack size to 131072.
Yeah. Upping of stack size helped me out. Thanks.
So this issue can be closed now too?
Yes. Everything looks fine.
Greetings @mackron.
Sir I hope for your help. There is an issue while running built project and I can't understand what I'm doing wrong.
When game starts the sound begins to play. Everything seems fine but when 1st sound starts playing I get these errors -
After reloading the page only 2nd error appears.
Here is my cmake-config. I upload buffered sounds to browser filesystem and when game engine starts I decode it and play.
if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(USE_FLAGS "-s USE_ZLIB=1 -sUSE_LIBJPEG=1 -sUSE_LIBPNG=1 -sWASM_WORKERS=1 -frtti -flto -O0 -g" CACHE STRING "Compilation flags" FORCE) set(LINKING_FLAGS "--preload-file ${ASSETS_PATH}/assets@/assets -sFULL_ES2 -sWASM=1 -sFETCH=1 --use-preload-plugins -sEXIT_RUNTIME=1 -sALLOW_MEMORY_GROWTH=1 -sEXPORTED_FUNCTIONS=['_main','_photoTaken','_malloc','_setNotificationToken','_interceptPushNotification'] -sEXPORTED_RUNTIME_METHODS=[cwrap] -sFORCE_FILESYSTEM=1 -lidbfs.js -frtti -flto -O0 -g -sAUDIO_WORKLET=1 -sWASM_WORKERS=1 -sASYNCIFY -sASYNCIFY_STACK_SIZE=65536" CACHE STRING "Linking flags" FORCE) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${USE_FLAGS}") add_definitions(-DTARGET_WEB -DDEBUG -DMA_ENABLE_AUDIO_WORKLETS)
Sound engine initialization
Sound load & play
Sound-files are buffered here
If you need more info, please let me know.