Page 1 of 1

Bug report: v1.3.14-beta (SOLVED)

Posted: Tue Dec 27, 2011 9:59 am
by Hagrid
Exporting 8-bit 16000hz wav file has incorrect values in the file header.

After setting up a new project for 16000 Hz sample rate, I generated a one second tone, giving 16,000 samples.

Exporting the file using "Other compressed files" I have set under the Options Header = WAV (Microsoft) and Encoding = Unsigned 8 bit PCM.

The resulting file has the correct size, but the WAV header values are incorrect, describing the file as:
Sample Rate = 48000 Hz
Byte Rate = 96000
Block Align = 2
BitsPerSample = 16

The project and output file are attached for your bemusement.

Hex dump of the file header is here:
00000000: 52 49 46 46 24 77 01 00 57 41 56 45 66 6D 74 20 | RIFF$w..WAVEfmt
00000010: 10 00 00 00 01 00 01 00 80 BB 00 00 00 77 01 00 | .............w..
00000020: 02 00 10 00 64 61 74 61 00 77 01 00 79 00 7E 04 | ....data.w..y.~.
00000030: 68 0A 27 11 DE 17 CE 1D 1E 23 08 28 1D 2D 5E 32 | h.'......#.(.-^2

Sample rate (offset 0x18) is the sequence "80 BB 00 00" = 48000
Byte rate (offset 0x1c) is the sequence "00 77 01 00" = 96000
Block align (offset 0x20) follows this "02 00" = 2 bytes
Sample size (offset 0x22) is "10 00" = 16 bits

NumChannels is correct = 1 (OFfset 0x16)

I just noticed that the ChunkSize in the main chunk and the data subchunk are also incorrect.
(Offset 0x04) "24 77 01 00" = 96036
(Offset 0x24) "00 77 01 00" = 96000

The actual wav file is 16044 bytes.

Re: Bug report: v1.3.14-beta

Posted: Tue Dec 27, 2011 6:12 pm
by Edgar
My results:
16bit.png
16bit.png (19.21 KiB) Viewed 524 times
You will need to do the interpreting, but it does not look the same as yours.

Re: Bug report: v1.3.14-beta (SOLVED)

Posted: Tue Dec 27, 2011 8:15 pm
by Hagrid
Please ignore - problem with the method I was using to view hex files (it was caching an earlier file). The hex dump was from a circuit simulator I am using to develop a sound controller and it appears that I have to go through an extra step when I change the source sound file to make it reload the data! Educational if not embarassing...