Closed Dawoodoz closed 2 years ago
There is now a portable sound layer in the experimental branch. Just need to test it properly with different sound engines, optimize performance, make examples, create a build system that makes it convenient and document how to use it.
A standard representation for raw sound buffers would also be useful, so that different sound engines can share code for loading and saving different compressed formats.
The backend itself is done and currently used in the skeleton code for an SDK wizard application.
While game engines should be allowed to fully define how sounds are played and mixed in software, it would be good to at least have a sound portability layer that runs as a background thread and requests sound samples to be generated for speakers once in a while using a lambda callback.
The alternative would be to let anyone wanting sound include external sound engines just for the portability, in which features are changed when the sound engine is replaced. Sound output is simple, you just send samples to each speaker.
Due to the added work of selecting backend implementations and libraries for different platforms, adding this should have minimal impact on the ease of using the framework without sound. Maybe just an extra argument to the build scripts that can be assigned to NONE.