Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Feature requests and bug reports
3D audio not 3D in webGL

csp-games
Guest
Quote
2021-02-10 03:15:49

It works in the editor, but not in the browser, mp3, tried both, mono and stereo. Am I doing anything wrong?

Also, loop has a nasty pause of about 200ms, making looped ambiance sounds impossible. That may be a JS problem in general.


veganpete
Registered User
Quote
2021-02-10 08:33:03

Not sure if this will fix it but I would try using .wav (wave) audio - in case the browsers mp3 codec is creating the problems?


j9907
Guest
Quote
2021-02-10 13:06:22

mp3s have a bit of silence in the beginning. That's just how the format was designed. I'd suggest ogg personally. It tends to sound better at lower bit-rates anyways. Opus support would be great though.


csp-games
Guest
Quote
2021-02-10 23:30:43

Thank you guys, appreciate it. I don't think it's a matter of MP3 vs WAV. Furthermore I think I couldn't load those WAVs (old ones, 22kHz) in CC, so I converted them to mp3.

Well, I couldn't resist to write my own 3D sound engine, that offers a bit more:

https://jfkeo1010etc.itch.io/mini3dsoundenginejs

I yet have to marry it with CC tho, but works as standalone demo. Due to CORS it requires a server, but theoretically it can be run from inside the webGL target folder of CC, after publishing something with CC (which starts a local server btw)


csp-games
Guest
Quote
2021-02-12 02:06:46

Ok, I managed to put the two together, a CC level and this 3D soundengine. I posted it on itch.io. You can run it there in the browser. A shame the CC keyboard handler does not work on itch.io ! I am a beginner and I wrote a keyboard handler that worked everywhere. Anyway, here's the link:

https://jfkeo1010etc.itch.io/mini3dsoundenginejs-meets-coppercube-game-engine


csp-games
Guest
Quote
2021-02-12 18:14:15

Turns out by now it works partially. The page scrolls on cursor keys, which are also used to walk around. However, when you don't press the down key, you can navigate, as the page is scrolled to the top, potentially hiding the bottom part of the game canvas, depending on your screen resolution.

This demo shows the 3D sound engine, my smooth fps camera extension with footstep animation layer and last but not least CC's beautiful out-of-the-box terrain and water,



BTW sorry that I was kinda negative, I had a bad day.

https://jfkeo1010etc.itch.io/min...


csp-games
Guest
Quote
2021-02-12 18:27:51

Ok, now it's getting weird, now it doesn't work anymore, not at all. (the keys) - not sure whether the dudes at itch.io are constanly altering their page code, or, what would be a worst case scenario, we are dealing here with the coders' nightmare, the inpersistant, nonreprocuceable bug.


gree
Registered User
Quote
2022-12-13 19:18:54

I'm trying to get a simple working example. The several zip files do work on localhost; but I can't find any ccb file on how to implement it directly in ccb.

Do I need to use the custom cam script?

Thanks all!


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internati?nal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact