Dawoodoz / DFPSR

Fast realtime softare rendering library for C++14 using SSE/AVX/NEON. 2D, 3D and isometric rendering with minimal system dependencies.
https://dawoodoz.com/dfpsr.html
78 stars 6 forks source link

SIMD vectorize sound backends #55

Closed Dawoodoz closed 1 year ago

Dawoodoz commented 1 year ago

Aligning the sound buffers and vectorizing the conversions would allow creating SIMD vectorized sound engines on top of the framework. A simple sound engine where sounds must be pre-scaled when changing playback speed to avoid runtime interpolation, might be fast enough even on a weak ARM processor as long as it has NEON.

Dawoodoz commented 1 year ago

The backends are now partially vectorized in the experimental branch. Fully vectorizing them would require extending simd.h with signed 16-bit integers or adding 16-bit packed memory write functions.

Creating a vectorized sound engine would require knowing the padded buffer lengths, which requires changing the raw data pointer into SafePointer in the backend interface, holding the padded bound on top of the used elements.

Dawoodoz commented 1 year ago

Merged into master.