olcSoundWaveEngine icon indicating copy to clipboard operation
olcSoundWaveEngine copied to clipboard

Multithreaded implementation added to SDL_mixer backend

Open j-lohuis opened this issue 3 years ago • 1 comments

Added a optional multithreaded implementation to the SDL_mixer backend. This reduces the latency between playing two sound buffers by computing the next buffer as the current buffer is playing.

The new multithreaded implementation is enabled by default for native applications but the old singlethreaded implementation can be forced by defining SOUNDWAVE_USING_SDLMIXER_SINGLETHREAD and is used in emscripten by default. To enable the multithreaded implementation in emscripten aswell, provide the -pthread during compilation and linking (https://emscripten.org/docs/porting/pthreads.html).

j-lohuis avatar Sep 07 '22 19:09 j-lohuis

sweet, thanks

js190 avatar Sep 09 '22 09:09 js190