libretro / hatari

New rebasing of Hatari based on Mercurial upstream. Tries to be a shallow fork for easy upstreaming later on.
25 stars 41 forks source link

fix the missing sample issue (was causing constant 30hz buzz/crackle) #59

Closed bbbradsmith closed 3 years ago

bbbradsmith commented 3 years ago

This addresses the last remaining error I reported in #48 .

Hatari was generating audio at a variable number of samples per frame, to stay synchronized with hardware accurate timings that aren't quite 50/60hz, but the way we're funnelling audio to RetroArch can't seem to deal with this, causing a 0 sample to appear at the end of frames periodically (creating an unpleasant buzz).

This change forces it to use the expected number of samples every frame rather than trying to make this minute accuracy adjustment. The change is similar to setting RoundVBLPerSec to true, but instead the effect is only limited to the audio output; other emulation should remain the same.