Thoughts on Opus support (audio)

I like that defold supports ogg vorbis. Opus is said to be the better open codec, developed by the same people who made ogg vorbis (the non profit corporation ,
Xiph.Org Foundation), while also being lower latency.

What are your thoughts on getting Opus support? Thought it might be a better idea to ask here before posting it as a feature request. It would be cool to see supported in the future, and another way defold can be made better. More on opus and how it compares to other codecs http://opus-codec.org/comparison/

1 Like

If you need low latency for effects you can use wav.

I’m not sure this would be worth it as a priority. Ideally we could provide wav files and Defold could process the files for whatever the intended use (sfx/music) for whatever target it is using and with quality options too like images have now. Right now audio isn’t processed at all.

Another thing Defold could do if it adds audio processing is to merge all audio into a single audio file and then seek the position when playing audio as this is way more efficient for audio playback than having lots of audio files if many are always meant to be loaded always.

Someone could make a native extension to support it too. https://github.com/kcat/alure

3 Likes

I know I’d like to see something like that implemented. This would make a bigger difference in games where sounds/music are bigger focus. Think games like Cytus or Crypt of the NecroDancer which are both very popular games. Another upside to using opus over wav files is the smaller footprint. Might not make a big difference in small games but in much larger or sound heavy projects it can be significant.

On another note, how would it go about seeking from this “merged” master audo file if it needs to play different parts of the track at the same time? Im assuming it would just have to play multiple instances of the track in parallel, but wouldn’t that kind of end up making things less efficient in such scenarios?

Crypt of The NecroDancer uses tracker files for its music I believe. So it is even smaller and all of the audio is generated on the fly.

https://www.defold.com/community/projects/90809/ this supports mod/xm/s3m/it if I’m not mistaken.

4 Likes

dapetcu can correct me on this if I’m wrong - the FMOD extension does not currently include the low level api calls that are needed to work with tracker formats.

FMOD has this whole studio approach with its own DAW-like program, and that’s supported in the extension.