Bug in pygame.mixer.sound.fadeout : "stair effect" fadeout
I've noticed this with headphones, and now it is confirmed, as I recorded my stereo out.
pygame.mixer.sound.fadeout is not a normal linear fadefout, but a step function ("staircase" function) :
The "width" of the constant pieces is exactly the audio buffer size (1024 samples in my example).
In order to reproduce it :
1) Download http://gget.it/uk2oi63z/sine1.wav
2) Play it with pygame.mixer.sound.play() and do a fadeout(200) Ready to use test .py file : http://gget.it/0x6zxbvl/pygamefadeout.py
3) You'll notice stair effect. Here is the sound I get : http://gget.it/zjh61iz2/sine1_fadeout_with_pygame.wav
How to solve it ? I suspect it comes from /src/mixer.c, which calls
Tested on both Pygame 1.9 Win7/PC and RaspberryPi.