Replies: 4 comments
-
Further, are multiple sound backends planned, similar to what we did with TTS? |
Beta Was this translation helpful? Give feedback.
-
Hey, look at engine/resonator 😉 It uses webaudio directly. There's some code in there that uses Resonance to do 3D panning, however I stopped working on that bit because in my opinion it didn't sound too great. Especially the reverb. Though thinking about it, I should probably rename it to just engine/sound. It's called Resonator because in the beginning I wrote it to make using Resonance Audio easier. That's no longer it's main goal though. If there's another audio backend for the browser that isn't webaudio I'm sure we could support it. Though as far as I'm aware there isn't one, and even wasm modules would have to go through webaudio. |
Beta Was this translation helpful? Give feedback.
-
All browser sound libraries are just wrappers to reduce the amount of code needed to accomplish tasks in the browser. They'll often have nice functionality, like sound iterators, sound effects, and slowly moving a 3D audio node from point A to point B, but thank goodness they all use Web Audio at the end of the day, so in Wad, for example, you can go in and access the audio context extremely easily. I'll look at what you've done so far in engine/resonator. |
Beta Was this translation helpful? Give feedback.
-
It's very game oriented, but I'm not opposed to extending it a bit. It's also not complete yet but most of what I want it to do is there. Buses for in-game sound, UI sound, and raw output. Super easy way to add reverb using convolution. In the future I want to add a module that links it to the physics system to toggle and modify a bunch of delay lines and filters to simulate occlusion and echoes off of walls, but for that, I need to finish the physics first. I'm playing with a voxel based terrain system right now because, honestly, without sight, it's the easiest to implement and understand. But I'm probably not going to link them directly, but through the world module. If you want a more generic audio library, you might not want this one. It's very game oriented and set up to handle those tasks very easily at the cost of being quite opinionated. |
Beta Was this translation helpful? Give feedback.
-
Hey,
What sound library are you thinking of using?
I've been using Web-Audio-Daw mostly because it's easy to use and learn, has both procedurally generated and recording sound handling, and is open to contributions. Some of the problems are that every so often we run into bugs related to pushing the library to the extreme (wanting to pan poly-wads, for example), but the creator is pretty fast at making changes. It's also not typed or split into modules for tree-shaking, but it's not that big of a library, and there is an issue open to type it. It also does not do garbage collection, which may be a problem for us soon. I know there are other libraries like Howler, but it doesn't have any procedurally generated sound options, and Tuna is on the other end with no recording handling. I haven't really found any other libraries with both together in an easy to use interface.
Beta Was this translation helpful? Give feedback.
All reactions