- fwrite(&htole16(format->wFormatTag), 2, 1, file);
- fwrite(&htole16(format->nChannels), 2, 1, file);
- fwrite(&htole32(format->nSamplesPerSec), 4, 1, file);
- fwrite(&htole32(format->nAvgBytesPerSec), 4, 1, file);
- fwrite(&htole16(format->nBlockAlign), 2, 1, file);
- fwrite(&htole16(format->wBitsPerSample), 2, 1, file);
- fwrite(&htole16(format->cbSize), 2, 1, file);
+ fwrite_le16(format->wFormatTag, file);
+ fwrite_le16(format->nChannels, file);
+ fwrite_le32(format->nSamplesPerSec, file);
+ fwrite_le32(format->nAvgBytesPerSec, file);
+ fwrite_le16(format->nBlockAlign, file);
+ fwrite_le16(format->wBitsPerSample, file);
+ fwrite_le16(format->cbSize, file);