Closed kebby closed 2 years ago
Great stuff :) I have made a few comments, also could you update the Changelog in README.MD
? There is no new buildnr yet so we can just continue after ## Changelog
. And don't forget to credit yourself :)
These are all little things, which we could also pick up by merging this into a branch and making a new PR if you want.
All done.
This PR does two things:
make the emulation sample rate configurable. I realized that on my laptop under Windows there were clearly audible 44100->48000 resampling artifacts so I added a Sound.Emulation.SampleFrequency config option (valid for both sound output and disk writing). I set the default for Windows to 48000 because that's the rate the Windows audio system works on the absolute majority of devices nowadays.
get rid of the clicks each time reSID is reset. This probably warrants an explanation: The SID has quite a DC offset on its output pin so on the C64's board there's a high pass filter at around 16Hz that eliminates that offset. All of this is faithfully emulated by reSID in ExternalFilter.cpp/h - albeit perhaps a bit too faithfully. When you turn on the C64 the filter's capacitors need to charge up first, resulting in a loud click, and reSID does the same thing on each reset. My change primes the filter state to that DC offset on the first sample after a reset, i.e. "pre-charges the capacitors", so to speak. I reckon less annoyance especially when using headphones is more important here than being physically correct on that specific detail :)