right, I did a lot here:
1) implemented the DMC. It was a bit tricky, but not as bad as I
had initially thought. I should implement CPU stall better, but w/e
2) I figured out why my pulses sounded like shit! It's because I
accidentally used sweep.val instead of sweep_val, i.e: assigning to
the union on every sweep clock! I fixed that, adn renamed sweep.val
to sweep._val so I don't make that mistake in the future.
3) Why even use `short` samples? It's 2018, we all have FPUs!
---
I also experimented with switching to SDL_QueueAudio instead of
the current Sounds_Queue.h thing I from Blargg, but there seems to
be a gradual desync issue when I use it...
Also, I found that bumping the sample-rate up greatly improved the
audio-quality, espeically on pulses. iirc, it's because I am doing
sampling in a shitty way, when I should be sampling more around key
inflection points.
See http://www.slack.net/~ant/bl-synth/ for what I mean...
(that's how Blargg's nes_snd_emu does it, and it sounds awesome)
It's kinda jank, but hey, it works?
The serious issue is that it relies on the SDL2 dylib installed
from homebrew, and if that verion ever gets bumped, RIP.