#sound gain html runtime crash

1 messages · Page 1 of 1 (latest)

red moss
#

Hi,
I know there were some sound changes and the windows target still works fine, however, something in the html runtime of the new 2023.2 seems to not reflect that ...

maybe one of you cracks can see which function this is here, that no longer has a .gain. member

Any help appreciated!

#
Uncaught TypeError: Cannot read properties of null (reading 'gain')
    at _rR (jam-template-src.js?QJEAC=1938144749:6078:252)
    at _VQ (jam-template-src.js?QJEAC=1938144749:1488:215)
    at _HQ4._n6 [as _O5] (jam-template-src.js?QJEAC=1938144749:4184:25)
    at _HQ4._et2 (jam-template-src.js?QJEAC=1938144749:8967:424)
    at _Bi3._et2 (jam-template-src.js?QJEAC=1938144749:8765:294)
    at _Bi3._P93 (jam-template-src.js?QJEAC=1938144749:8765:475)
    at _dM1 (jam-template-src.js?QJEAC=1938144749:5628:70)
    at _HQ4._ga [as _O5] (jam-template-src.js?QJEAC=1938144749:4692:492)
    at _HQ4._et2 (jam-template-src.js?QJEAC=1938144749:8967:424)
    at _Bi3._et2 (jam-template-src.js?QJEAC=1938144749:8765:294)
#

I stopped in the debugger and we can see, that this _zL3 resolves to null in the const declaration:

#

ok... figured it out - it's audio_sound_gain which crashes
what's the new way to set the volume of a sound?

#

ok... it seems i have to set the gain when i call audio_play_sound as parameter -- that's ok - but how to modify the volume of an already playing sound if audio_sound_gain crashes?

pliant bolt
#

audio_sound_gain() shouldn't crash

cursive bay
#

We’ve had a recent discussion on audio_sound_gain() causing a crash (in #lazy_gm_bug_reports)

#

Make sure that the audio context is available or that the audio_play_sound is not returning -1

pliant bolt
#

oh is it that bug still?

cursive bay
#

Yeah

pliant bolt
#

damn

cursive bay
#

Shouldn’t crash in any other way

#

But for now just gotta throw a few checks in place

red moss
#

yep - ty -- I wrote a bit of "safety" code around it -- it's working for now but yeah, there's definitely something not perfectly in place here

cursive bay
#

Yeah fuji mentioned that they added in a bunch of checks for emitters that failed silently, so that might’ve had been extended to assets too

red moss
#

i see -- i will open another question shortly because I might have a language-barrier//understanding problem with the manual -- it's also about sounds but it's another topic - don't want to hijack my own thread