Check out the hexdump of the file you created.
When you do, you will realise that there are 7FFF values in the file that correspond to your sample peaks.
But, I'm going to say that you also have clipping here.
Why? Because I can see two values of 7FFF directly next to each other. This indicates that there are two identical peak sample values adjacent to ...
So many possible reasons, really. It's possible that there is some setting that is not obvious and is increasing the level of the audio inside the application that is making it exceed 0 dBFS. For instance, if it's a stereo file and the left and right channels are both panned to the center, you could be adding 3 - 6 dB to the summed audio.
Probably more ...
I have one little question about loudness calibration levels. It seems there are 2 norms:
-20dB FS of pink noise RMS = 85 dB(C) SPL used for film, 79 for TV (it is 6 dB below film)
the second is pink noise on 83 dB(C) for film and 78 for TV (only 5 dB below film), even 73 for music (according to Bob Katz K-system).
First is used in Central Europe - ...