Wav File Header Data not being created properly

It is not compressed, you can check that from the file size that is produced.

Thats what i figured but it doesent explain why fe ff is being written into the AudioFormat section

From the Juce code :

writeChunkHeader (chunkName ("fmt "), 40);
output->writeShort ((short) (uint16) 0xfffe); // WAVE_FORMAT_EXTENSIBLE

From the Microsoft documentation :

The WAVEFORMATEXTENSIBLE structure defines the format of waveform-audio data for formats having more than two channels or higher sample resolutions than allowed by WAVEFORMATEX. It can also be used to define any format that can be defined by WAVEFORMATEX

Ah I see, im using a sample rate of 192000hz and 8 channels so it cant store it in the standard deliniated format.

And I guess without extensible you would be limited to 32 bit number of samples, i.e. limited in the overall length. Especially with the high samplerate this would be quite limiting. Would be a headache, if you realise that after writing the file and you would have to change the format afterwards.