Re: [hatari-devel] SDL1 vs. SDL2 sound pausing

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 10/09/2016 à 11:17, Jerome Vernet a écrit :
Hi again,

I'm not a specialist at all, but
Looking further on FS-UAE, FS-UAE is multi-threaded. On thread for SDL,
on for emulation, on for the mouse emulation.
Hatari on MacOsX have only one thread. So, basically, selecting a menu
interrupt emulation anywhere.

SDL2 have a separate thread for sound: "Audio runs independently in a
separate thread, filled via a user callback mechanism ". SDL1 do not:
sound is interrupted in SDL1, not in SDL2. The sound thread wait for
data to play, but main Hatari Thread do not feed it. Hence, the noise,
SDL2 continiously playing the last chunk of sound.

Is it a plausible explanation ?

Hi

this could be possible ; in that case, maybe SDL2 has different option when sound buffer is not filled fast enough ? (eg: loop on latest data = noise, play empty sample instead (which would be better), ...)

Maybe looking at the code for the sound thread in sdl2 could give some idea of some possible options for sdl2 ?




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/