-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Just wanted to know whether audio support is a planned addition to this library. Audio is arguably a necessary component of most games, and I think it's something that's generally expected of most game frameworks. If you are interested, I have a feature writeup:
When it comes to cross platform game audio libraries/wrappers, the big names are essentially OpenAL(Soft), SDL_Mixer, SoLoud, FMOD, Wwise, and BASS. The first two are pretty dated, and the latter three are commercially licensed, which I don't think fits the theme of this repository. SoLoud is great, but I had a few concerns (see note 1).
Thus, I suggest a relatively thin wrapper around cute_sound. I like it for the following reasons:
- hooks into sdl for non standard platforms
- single header (technically two with ogg vorbis), very lightweight
- has instanced audio (which allows control after an instance has been played)
- has the ability to get/set current sample position (very important for rhythm games, haha)
- simple music fade support
The following implementation details would be pretty important
- separate namespace (~Foster.Framework.Audio) and optionally enabled (via App.Run), to avoid conflicts if a user decides to use another audio library (see note 2)
I know you used cute_sound with blah, so your opinion would obviously mean more than these superficial observations.
If this is something that is interesting to you, I'd be more than happy to take an initial crack at it.
note 1: SoLoud is an extremely honorable mention. It's pretty weird to build, but I have managed it. It's also a very fully featured library with effects, buses, and 3d spatialization, which may or may not be overkill. However, the effect on binary size would probably be considerable (it's actually pretty light < 1MB, forgot I published more than just the binary as an artifact) and it would most definitely constitute a dependency.
note 2: A one size fits all approach will simply not meet the complex needs of all games. Similar to animation, sprite, and ECS implementations, the correct audio implementation largely depends on the use case. If we cover 90-99% of simple 2D use cases with a lightweight abstraction and don't get in a user's way if they decide to use something different, that would be good enough.