ValleyBell / libvgm

A more modular rewrite of most components from VGMPlay. will include sub-libraries for audio output, sound emulation and VGM playback
irc://irc.digibase.ca/#vgmrips
136 stars 33 forks source link

YMF278B: Fix aliasing in high pitched notes. #97

Closed grauw closed 2 years ago

grauw commented 2 years ago

In afded2e the position increment and loop check was changed to reproduce the noise effect in Omega’s Lizard Star track, however in the process this also changed which samples were read in to interpolate between.

The interpolation should always be between two consecutive samples, however after the prior change they would be several samples apart when the increment is greater than 1. This generates an incorrectly interpolated sample value.

The issue is fixed by retrieving the two samples directly in the location where they are interpolated, and the double buffer (sample1, sample2) is removed.

See https://github.com/openMSX/openMSX/issues/1400