Kha icon indicating copy to clipboard operation
Kha copied to clipboard

Sound conversion issues.

Open Mishurin opened this issue 6 years ago • 9 comments

Hi guys! I am trying to follow the tutorial by an article from the blog that was recommended on kha wiki page. http://jamiltron.com/categories/khashmup It is a bit outdated in relation to the evolving kha and its api. But nonetheless it was promising and worked for me fine just until now, when I started to add audio assets. I used kha version (?) which was embedded in Armory SDK (2.7). Apart from that I don't know hot to detect its version. Kodestudio was also embedded into Armory SDK. Therefore all build tasks and tools are from there directly as well.

When I am compiling project to HTML5 target looks like compilation is not going to finish. Because of some conversion of wav to ogg or something. It is difficult to say because there is no warnings or errors. Output of Kode shows only this: Creating Kha project. Exporting asset 1 of 3 (bullet.png). Exporting asset 2 of 3 (bulletShoot.wav).

Looks like conversion haven't finished or haven't started or something. Access to the sound file 'bulletShoot.wav' is following: Assets.sounds.get('bulletShoot')

Any ideas?

Thanks!

Mishurin avatar Jul 09 '18 00:07 Mishurin

khamake uses oggenc located in Kha/Tools/oggenc - see if you can use that manually to convert your bulletShoot.wav.

RobDangerous avatar Jul 09 '18 00:07 RobDangerous

Thank you for the quick reply Rob! I have tried just what you said - it worked for build. It was able to compile with the following output: Creating Kha project. Exporting asset 1 of 3 (bullet.png). Exporting asset 2 of 3 (bulletShoot.ogg). Exporting asset 3 of 3 (playerShip.png). Compiling shader 1 of 8 (painter-colored.frag.glsl). Compiling shader 2 of 8 (painter-colored.vert.glsl). Compiling shader 3 of 8 (painter-image.frag.glsl). Compiling shader 4 of 8 (painter-image.vert.glsl). Compiling shader 5 of 8 (painter-text.frag.glsl). Compiling shader 6 of 8 (painter-text.vert.glsl). Compiling shader 7 of 8 (painter-video.frag.glsl). Compiling shader 8 of 8 (painter-video.vert.glsl). Done.

But it looks like webapp coudln't link properly ogg file which is however was loaded by network. kha_Assets.sounds doesn't have any registered sounds at all.

Looks like this handler may not link 'blob' to kha assets registry: kha_Assets.loadBlob("bulletShoot_ogg",function(blob) { done();

Mishurin avatar Jul 09 '18 00:07 Mishurin

Ah, that's not quite what I meant. Things don't work out when you provide an ogg file - just wanted you to test oggenc to hopefully figure out why it stops the build. So you could actually convert it to an ogg using the included oggenc without errors?

RobDangerous avatar Jul 09 '18 00:07 RobDangerous

Yes this tool worked fine - generated proper ogg file. I just put it in the asset folder and the build step which presumed wav-ogg conversion was omitted. The 'bulletShoot_ogg' was registered in blobs not in sounds asset registry, however.

Mishurin avatar Jul 09 '18 00:07 Mishurin

Hm. Then please upload your project and tell me about your system, will then try to reproduce it tomorrow (have to get some sleep now).

RobDangerous avatar Jul 09 '18 00:07 RobDangerous

I have created a fork from original tutorial repo: https://github.com/Mishurin/KhaShmup My development environment:

  • ubuntu 16
  • armsdk v(?) some recent build. changes.md says about some issues fixed as of 2018-06-01. That is some fresh build.
  • kha and Kodestudio included in armsdk
  • target build - html5

Thank you for your help!

Mishurin avatar Jul 09 '18 00:07 Mishurin

Your project has the ogg file. Can you revert it to that wav file so I can try to reproduce the original error?

RobDangerous avatar Jul 12 '18 07:07 RobDangerous

Hi Rob, I reverted the wav file but I cannot see this way any output from build as I already mentioned. Build is just hanging. Running it with "CTRL+SHIFT+P" -> "Compile Kha Project" -> "HTML5". Is it possible to see build logs somehow? I could have a look. Probably wav->ogg convertor just waiting for input and hanging. Thanks. Here is suggested updates of the assets: https://github.com/Mishurin/KhaShmup/tree/master/Assets

Mishurin avatar Jul 17 '18 17:07 Mishurin

Probably fixed with https://github.com/Kode/khamake/pull/195. I can't reproduce anyway.

RblSb avatar Apr 14 '19 15:04 RblSb