When an AudioFile<double> is saved to 32-bit WAV, the result is loud, scratchy noise.
This works for AudioFile<float>s but not for AudioFile<double>s:
Line 998 in AudioFile.h: sampleAsInt = (int32_t) reinterpret_cast<int32_t&> (samples[channel][i]);
(By the way, thanks for sharing your code! I'm in the process of replacing libsndfile in my audio library before making it public with a permissive license and I'm digging this single-header C++ library of yours.)