Closed hrydgard closed 3 years ago
Found another one, if volshift isn't 0 in the wave channel, you're crushing the precision of the samples. Need to scale them up by a factor of at least 4 before you shift down. Then compensate for the additional volume in the mixing.
I have fixed the issues in 2741256df3e7275e59b5bc4c9ab6258e4420a838 and 20414561c8762a5ffe5557ed1a338fe63fff7b16. Thanks a lot for pointing them out! :+1:
In sound.rs
The self.length_enabled statement is missing. Adding this fixes annoying noise in a number of games including Zelda: Link's Awakening.
Additionally, the enabled flag on the wave channel should be set like this:
The Zelda: Oracle games needs this but seem to have other issues too.
Just stuff I noticed when messing around with it :) (I've been using parts of the code to play with upscaling shaders).