+ 1
Audio causes lagg
Hi! I have finally been able to get audio playing as I want! However every time audio is played, the game laggs a little bit. I load all the audio upon starting the game. Anyone know how to get rid of this lagg? Here is the code: https://code.sololearn.com/WkIPQwthB6K9/?ref=app To remove flap audio (and lagg), comment out line 177 âflapp();â Thanks! Joakim
11 Respostas
+ 1
I managed to fix it!! HTML5 Audio is very bad for my purpose. There is actually a part in ThreeJS that is made for playing audio like this. This removed all the lagg! See code for how it is implementedđ
+ 4
iphone 6s+ no lag here. Just an amazing codeđ
+ 3
It doesnât lag on my iPad. Strange!
+ 3
xp nvdo Sweet! Thanks a lot đ
+ 3
saantonandre Hey man! You are good with sounds and stuff, do you have any idea?đ€
+ 3
Joakim Nyland just tried this on my devices, on my samsung tab the sound only plays on the first tap then every other tap gives this error and plays no sound.
uncaught (in promise)DataCloneError: Cannot decode detached ArrayBuffer Line:37297.
ios works great still. sounds all play with no lag, and no error.
+ 3
Wonderful!
+ 2
More information: I have an fps of about 58, but when âflapâ audio plays, fps drops by 10-26 which causes the tiny lagg.. No one knows anything about this?
+ 2
Ahmed Mokhles Thanks a lot!đđ
+ 1
Rowsej I guess iPads are a lot faster. Thanks for checking! Can someone else check on an iPhone if it laggs a little?
+ 1
xp nvdo Thanks for the feedback! I will look into it!