add some debugging; audio still sounds terrible
add audio debug to file
GNU Indent is dumb
convert from sqaure wave to sine wave
clearify audio stream position
d'oh! that was dumb.

running the results through R showed something the earlier
printf debugging had not: namely that it seemed to be writing
to the buffer in a non-linear way

turned out to be a problem advancing the write cursor more than
the number of bytes written ... creating a weird patchy writing
effect
turn off debugging, but keep the clutter around for a bit
up to Handmade Hero Day 008
go back to using tone_hz rather than just stream position
sine can be a float rather than double
actually, I was a day ahead, it turns out