I'm trying to generate a 48 kHz, 16-bit 0 dBFS WAV file of a 997 Hz sine wave, where the level is set to the maximum value of 7FFF, but SoX warns me the output was clipped when it finishes. I don't think I hear any clipping, but Audacity's "show clipping" command shows clipping at the peak, and the frequency analysis also shows the level reaches 6.5 dB!
What am I doing wrong, and how can I get exactly the desired 7FFF value?
Here's my command line:
sox -c 2 -D -S -b 16 -r 48k -e signed-integer -n 997Hz_0dBFS.wav synth 30 sine 997 gain 0