Open icculus opened 1 year ago
(I'm putting this in the 3.2.0 milestone, but this can slip to 3.x, as it won't need API changes.)
Since we're looking at this anyway, one possible 3.0 improvement could be adding support for matrix coefficients, expanding the single volume parameter that MixAudioFormat currently has. We have this in FAudio, and have a couple SIMD implementations as well:
https://github.com/FNA-XNA/FAudio/blob/master/src/FAudio_internal_simd.c#L1279
We only work with float though, so unless we only implemented the Generic mixers for each sample format it would probably add quite a few internal functions to keep support for even the common channel permutations...
if the code is already 'simple' scalar, wouldn't the compiler already be able to generate sufficient SIMD?
if the code is already 'simple' scalar, wouldn't the compiler already be able to generate sufficient SIMD?
Yes, but in practice it sometimes can't/won't.
We should verify this, though. If GCC/Clang/MSVC will just auto-vectorize this stuff, that's probably good enough.
Originally posted by @icculus in https://github.com/libsdl-org/SDL/issues/7704#issuecomment-1546728946
The audio mixers are currently simple scalar for-loops, and would be excellent candidates for SIMD versions.