|Re: [hatari-devel] sound bug|
[ Thread Index |
| More lists.tuxfamily.org/hatari-devel Archives
Le 27/06/2014 18:04, Laurent Sallafranque a écrit :
I think there are 2 problems here :
- one with the general sound quality of Hatari (which is, from my point
of vue, dependant of the CPU accuracy (because the crossbar code is
related to the cpu time)
- one which is the every 4-5 times crappy sound problem which is not
related to the crossbar code (else, we would not have good quality sound
I think it's more a problem of synchro with SDL or something like that,
but I'pm pretty sure that the problem is not in the crossbar algos
(switching to 11 khz and back to 50 khz sometimes fix the crappy sound
problem, but if you do this and activate "trace crossbar" in the
debugger, you'll notice that there's no crossbar event involved, so no
change in the crossbar structure, but only in the "SDL" part of hatari.
I don't think the solution is in an improvement of the crossbar algos (I
may be wrong of course).
I haven't look that much at the falcon sound, but I doubt it's SDL
related : YM sound and STE sound never shown this kind of behaviour, you
can switch repeatedly between several output freq and sound doesn't go
wrong. So I'm not sure it's SDL.
Also, you say switching from 50 kHz to 11 kHz doesn't change anything in
crossbar, but as you need to play 5 times less samples per second, the
crossbar sound part at least needs to adapt to this (if it's not the
case, then sound will be really wrong).
SDL part is really simple : the callback function needs to be fed with a
fixed number of samples on each call to achieve proper output rate. From
the problem described by Doug for example, I'm not sure this looks like
a SDL problem (but I could be wrong :) )