FM synthesis fuzzy sound
OK, I figured out what the problem was using a hex editor. The compiler on Windows was seemingly introducing random 0x0D throughout the file. That's because of the mode I was opening the file with, "w". fwrite converted every instance of '\n' into "\r\n". All I had to do was change the file opening mode to "wb+", and it sounds exactly like the linked audio file, after changing the carrier amplitude to 2e5.