Commit eed8bd3
committed
Reworked a bunch of stuff, all ALsources use SDL_AudioStream, etc.
- Buffer data is stored in original format, always converted on the fly; I
suspect this will reduce memory usage in many cases.
- AL_PITCH now uses SDL_SetAudioStreamFrequencyRatio() instead of an FFT.
Since this effectively just resamples audio on the fly, this is all now in
in line with how OpenAL Soft handles pitch (and, a comment I noticed in the
1.1 spec's AL_SEC_OFFSET section implies this was always supposed to handle
pitch in the time domain anyhow). This makes MojoAL's AL_PITCH
implementation both more correct and also significantly faster than before.
- SDL_AudioStream puts are using the new "NoCopy" API, since we're already
holding the buffer data in memory anyhow. Less CPU work, less allocations.
- Some things moved from separate fields to a single SDL_AudioSpec, since this
struct is lean and mean in SDL3.
- Lots of other little tweaks and fixes.1 parent 7ce936a commit eed8bd3
1 file changed
+282
-542
lines changed
0 commit comments