audio: Redesigned audio conversion code for SDL3.

- SDL_AudioCVT is gone, even internally.
- libsamplerate is gone (I suspect our resampler is finally Good Enough).
- Cleanups and improvements to audio conversion interfaces.
- SDL_AudioStream can change its input/output format/rate/channels on the fly!
This commit is contained in:
Ryan C. Gordon committed 2023-04-27 18:35:15 -04:00
1 parent 44bec9c01c
commit e5a6c24c82
20 files changed
+1434 -2369

No files matched your search

+5 -9
View File
@@ -271,21 +271,17 @@ extern "C" {
/**
* \brief A variable controlling speed/quality tradeoff of audio resampling.
*
* If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
* to handle audio resampling. There are different resampling modes available
* that produce different levels of quality, using more CPU.
* SDL may be able to use different approaches to audio resampling, which
* produce different levels of quality, using more CPU.
*
* If this hint isn't specified to a valid setting, or libsamplerate isn't
* available, SDL will use the default, internal resampling algorithm.
*
* As of SDL 2.26, SDL_ConvertAudio() respects this hint when libsamplerate is available.
* If this hint isn't specified to a valid setting SDL will use the default.
*
* This hint is currently only checked at audio subsystem initialization.
*
* This variable can be set to the following values:
*
* "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
* "1" or "fast" - Use fast, slightly higher quality resampling, if available
* "0" or "default" - SDL chooses default (probably "medium").
* "1" or "fast" - Use fast, lower-quality resampling, if available
* "2" or "medium" - Use medium quality resampling, if available
* "3" or "best" - Use high quality resampling, if available
*/