It seems that SDL_MixAudio is broken in recent SDL2 releases (at least in
linux and iOS), to test this is enough to modify the test loopwave.c in the
SDL distribution to use SDL_MixAudio instead of SDL_memcpy (sample human
readable diff from HG):
… the audio output is wrong also with the default “sample.wav”
I tried to look with HG to the change that caused this regression but I
cannot find it. But I’m quite sure that before the naming change from 1.3
-> 2.0 and the removal of the 1.2 compatibility layer SDL_MixAudio used to
work :)–
Bye,
Gabry
This was an intentional change by Ryan to remove a memset in the audio
mixing callback. In general you’re filling audio entirely, and if you’re
not you can do a memset yourself before passing the buffer around to be
mixed into.On Thu, Nov 15, 2012 at 2:51 AM, Gabriele Greco <gabriele.greco at darts.it>wrote:
It seems that SDL_MixAudio is broken in recent SDL2 releases (at least in
linux and iOS), to test this is enough to modify the test loopwave.c in the
SDL distribution to use SDL_MixAudio instead of SDL_memcpy (sample human
readable diff from HG):
… the audio output is wrong also with the default “sample.wav”
I tried to look with HG to the change that caused this regression but I
cannot find it. But I’m quite sure that before the naming change from 1.3
→ 2.0 and the removal of the 1.2 compatibility layer SDL_MixAudio used to
work
This was an intentional change by Ryan to remove a memset in the audio
mixing callback. In general you’re filling audio entirely, and if you’re
not you can do a memset yourself before passing the buffer around to be
mixed into.
Yep you are right… adding memset in the mix callback solves the
problem… this is why I could not find SDL_MixAudio changes in the HG
history :)On Fri, Nov 16, 2012 at 7:08 AM, Sam Lantinga wrote: