Does Defold offer the ability to play/stop/restart positional audio? In HTML I have often used the quite outstanding Howler library. Is there anything like that available out of the box in Defold?
There’s the OpenAL extension: https://defold.com/assets/openal/
If you only want to target HTML5 then you can still use Howler, I did that a while ago. You can put whatever javascript you need in your index.html and then call JS functions from lua with html5.run().
This won’t be useful if you want to target other platforms of course.
Thanks. Looks interesting but perhaps not quite for what I had in mind. Howler allows you to easily play tracks from a piece of music that you provide. I have used customized music with distinct sections to play different beats, e.g. A-A-B-A…, A-B-A-A-B… etc. Easily done through an extension - at least for Android/Java. If there isn’t one available off the shelf I might just write one.
Ah, no, I don’t think we have an extension that allows you to do this.
There is the FMOD extension. You can do some really complex audio design with it. Check out FMOD Studio, their editor/DAW thing. If you have an indie budget it’s free under certain terms (adding their logo to your splash screen).
It’s an amazing piece of software that I have only praise for IF you’re ok with the licensing and with the rather hefty addition to your executable’s size (a few good MB).
@britzl I don’t understand your comment. Surely, this bit of your docs suggest that an extension can be written up in Java/Obj-C etc?
I think he meant there is currently no such extension.
What are the features you actually need from the sounds?
With the help of the new sound.pause()
function coming in the next release, you’ll be able to pause sounds.
Perhaps you can use the properties to create something that suits you? E.g.
- the
pan
property allows you to position 2D sounds. - with the
speed
property you can perhaps cheat some kind of doppler effect. - by lowering the
gain
property, you can simulate some sounds being “behind” the camera (or further away)
Of course, it’s not a replacement of a full 3D positional sound engine, but it might suit you or someone else’s game.