About audio in html5 mobile #10
-
I see there's a limitation in Aura.hx with mobile browsers. Is it possible to do the effects support manually or does it completely depend on Kha? I'm also interested to contribute to this library once I get more experience with Armory and Kha, is there any recommended read where I can learn more about audio implementation? I'd like to understand better this library's structure before contributing with code. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, sorry for my late answer. I guess you are referring to the following specific comment? Lines 73 to 78 in a14a1c9 What I mean with "custom audio callback" in that comment is a custom Unfortunately, the Kha implementation for mobile browsers does not use such a callback, so Aura also can't use it. Instead, the sounds are played via some other browser API (also via a Kha detour) and Aura only regularly updates some properties of the sounds which would otherwise happen in the audio callback (that's what this line is for). I believe you can find the Kha implementation for the mobile html5 audio here. The mobile audio channel is created here, and it looks like something similar might be missing in I can't really tell you the exact reason(s) why Kha does not play audio the same way on mobile browsers as on desktop browsers, I'm not even sure whether I knew it some time ago or whether I never really investigated it. There seems to be a bit of context here. Nonetheless, I believe there are some potential solutions for your problem, but they are not easy to implement and they have some big drawbacks:
Very cool! There is almost no documentation about the implementation at the moment (other than some code comments and maybe some hints in the wiki), but I'm happy to explain it or to write some documentation when I get time. If you have specific questions, feel free to open more discussions here :) Some general notes about the implementation:
|
Beta Was this translation helpful? Give feedback.
Hi, sorry for my late answer. I guess you are referring to the following specific comment?
aura/Sources/aura/Aura.hx
Lines 73 to 78 in a14a1c9
What I mean with "custom audio callback" in that comment is a custom
kha.audio2.Audio.audioCallback
function that is (indirectly) called by the audio driver to request more audio samples from the…