Fourteen years after the last release, the SDL_sound library version 2.0.1 has been released (version 2.0.0 was skipped), providing an extension over the SDL library with functions for decoding popular audio file formats such as MP3, WAV, OGG, FLAC, AIFF, VOC, MOD, MID, and AU. The significant change in version number is due to the shift of the code from the copyleft LGPLv2 license to the permissive zlib license, which is compatible with GPL. Also, despite maintaining API-level backward compatibility, SDL_sound now works only on the SDL 2.0 branch (support for building on top of SDL 1.2 has been discontinued).
No external libraries are used for decoding audio formats in SDL_sound — all the necessary source codes for decoding are included in the core. The provided API allows access to audio data from both files and from one or more external streams. Custom handlers can be attached for audio processing or to provide access to the resulting decoded data. Various manipulations with sample rates, formats, and audio channels are possible, including on-the-fly re-encoding.
Main changes in the SDL_sound 2.0 branch:
- Change of license to zlib and transition to using SDL 2.
- Removal of external dependencies from the code and integration of all decoders into the core. Replacement of some decoders with unified handlers. For example, working with the OGG format no longer requires installing the libogg library, as the stb_vorbis decoder is now integrated into the SDL_sound source code.
- Transition to using the CMake build system. Simplification of the process of using SDL_sound code in your projects.
- Discontinuation of support for the decoder for the obsolete QuickTime format, but on macOS and iOS, the universal CoreAudio decoder can still be used for QuickTime.
- Discontinuation of support for the Speex format due to the lack of a decoder implementation under the required license.
- Discontinuation of support for the MikMod decoder. The modplug decoder can be used to work with the same formats.
Source: opennet.ru
