[hatari-devel] Slow sound buffer

npomarede at corp.free.fr npomarede at corp.free.fr
Mon May 10 23:46:32 CEST 2010


On Mon, 10 May 2010, David Savinkoff wrote:

> Hi,
> 
> > By "advertised", do you mean you don't have delay at 11025 Hz
> > when setting "desiredAudioSpec.samples = 0" ?
> >
> I do have a delay, no good news (the delay is proportional to
> SoundBufferSize as it had been before). At 11025 Hz SoundBufferSize
> is 512 when "desiredAudioSpec.samples = 0" so this delay is
> shorter than when using 1024.

Theorically, 508/512 should give 46 ms delay at 11 kHz, which should not 
be noticeable. If you can hear it, then the delay is bigger than what SDL 
reports.

> alsamixer info:
> Card: SBLive 5.1 [SB0060]                                                    ?
> Chip: SigmaTel STAC9708,11    
> 
> 
> > If you set desiredAudioSpec.samples to 508 (=46 ms at 11 kHz) and
> > then run hatari at freq 11025, what output do you get in stderr ?
> >
> Sound_Reset SoundBufferSize 508 SAMPLES_PER_FRAME 184 nGeneratedSamples 692 , ActiveSndBufIdx 692
> Sound_ResetBufferIndex SoundBufferSize 508 SAMPLES_PER_FRAME 221 nGeneratedSamples 729 , ActiveSndBufIdx 13913

This differs from me there too ; if I set samples to 508, I get :

SoundBufferSize 352 SAMPLES_PER_FRAME 221 nGeneratedSamples 573 , ActiveSndBufIdx 13865

So, in my case alsa is reporting a lower value than the requested number 
of samples.

It would be interesting to compare when you have sdl 1.2.14 installed, to 
be sure we look at the same things.

Nicolas

PS : while searching for an older message at 
https://lists.berlios.de/pipermail/hatari-devel/2010q2/thread.html I 
noticed that your messages are not readable. The problem seems to be that 
your mail are only in html ; do you have a way to switch to text when 
posting, or perhaps to mixed text + html. This would allow a better 
archiving of the posted mails (this is certainly a limitation of berlios 
ML, but there's nothing we can do).


More information about the hatari-devel mailing list