Re: [hatari-devel] Sound sync patch to play with

[ Thread Index | Date Index | More Archives ]

On Tuesday 15 May 2012 13:41, Eero Tamminen wrote:
> Hi,
> On maanantai 14 toukokuu 2012, David Savinkoff wrote:
> > I believe the latency is caused when a sound card does not consume
> > the samples as fast as the computer provides them. This causes the
> > buffers to eventually fill to the maximum before samples are discarded.
> >
> > A slow cpu will result in no latency, whereas a fast cpu could cause
> > latency. My sound card is slower than the computer, and your sound
> > card is faster (no sound card is the same speed as the computer).
> Isn't Hatari sound sample speed controlled by the selected sound frequency?

It may be possible to make the sound card to use the 44100 Hz sample rate,
while throttling YM2149 sampling with 44000 to 44200 Hz in a control loop.
> I.e. isn't this a user error of selecting higher output HZ from Hatari
> options than what the sound card supports?  And shouldn't Hatari audio
> part reject / correct such a choice?
The problem is that the sound FIFO is not controlled at a given level,
therefore drifts to either overflowing or underflowing. The host
computer puts samples into the FIFO at what it believes to be
approximately 44100 Hz, and the sound card takes samples from
the FIFO at what it believes to be approximately 44100 Hz, where
Host sample rate != Sound card sample rate, and both are subject
to independent frequency variations (temperature, age, tolerance).

> 	- Eero

Mail converted by MHonArc 2.6.19+