Hi,
I am creating a PCM Wave file, but looking at it with the HEX file reader you can see something is wrong.
5249464626BE020057415645666D7420
1200000001000200007D000000F40100
0400100000006461746100BE02000000
On the second line you can see at the beginning:
1200 0000 SubChunk1Size this should be (0x10) 16 decimal not (0x12) 18 decimal
And then you can see betewenn the Bits per sample and the "data" in the third line you got 2 extra bytes that they shouldn't be there:
0400 = Block allignment = 4
1000 = Bits per sample = 16
0000 = ??????????
6461 = da
7461 = ta
Why is there this extra 2 bytes, it is breaking my wav file reader checker, the SubChunk1Size shoud be 16 on a PCM .
Somehow there must be a bug somewhere that adds this 2 bytes.
Does somebody else got the same problem? is it a library bug?
I will appreciate if anyone could check this, please!!!!!!!
Many thanks,
Helios
Comments: nothing wrong with this at all. fmt chunk can be 16 bytes (WAVEFORMAT), 18 bytes (WAVEFORMATEX), or longer. NAudio writes a WAVEFORMATEX by default, which is quite standard.
I am creating a PCM Wave file, but looking at it with the HEX file reader you can see something is wrong.
5249464626BE020057415645666D7420
1200000001000200007D000000F40100
0400100000006461746100BE02000000
On the second line you can see at the beginning:
1200 0000 SubChunk1Size this should be (0x10) 16 decimal not (0x12) 18 decimal
And then you can see betewenn the Bits per sample and the "data" in the third line you got 2 extra bytes that they shouldn't be there:
0400 = Block allignment = 4
1000 = Bits per sample = 16
0000 = ??????????
6461 = da
7461 = ta
Why is there this extra 2 bytes, it is breaking my wav file reader checker, the SubChunk1Size shoud be 16 on a PCM .
Somehow there must be a bug somewhere that adds this 2 bytes.
Does somebody else got the same problem? is it a library bug?
I will appreciate if anyone could check this, please!!!!!!!
Many thanks,
Helios
Comments: nothing wrong with this at all. fmt chunk can be 16 bytes (WAVEFORMAT), 18 bytes (WAVEFORMATEX), or longer. NAudio writes a WAVEFORMATEX by default, which is quite standard.