0

I originally asked this question on Signal Processing but it was off topic. So, here it goes!

I tried to export a recording from Audacity twice, each time with the same parameters and tags. The resulting files had different checksums. So I opened up an diffed the two files (as binary).

My first try was a wav file containing a 32 bit float PCM. Only 3 bits were different in the whole file.

0000003c: 01000000 01001001 01110000 01010111 01001100 11100111  @IpWL.

became

0000003c: 01000111 01001001 01110000 01010111 01001100 11100111  GIpWL.

My first question is: what are these three bits used for?

Then I tried this same procedure with flac files. I will not paste it here because it would be too long, but what happened is that at the beginning of the file, there were only a few differences here and there, but the farther in the file I got the more it was apparent that the files were different.

Why is that? Isn't the flac compression algorithm deterministic?

Finally I took a wav file containing a 16 bit signed PCM and converted it to a 16 bit signed flac file, and then back to wav. The file I obtained is very similar to the original but it seems data is offseted by 33 bytes, as you can see from these samples of the files:

Original file:

00000294: 11111110 11111111 11111111 11111111 11111101 11111111  ......
0000029a: 11111011 11111111 11111100 11111111 11111110 11111111  ......
000002a0: 00000000 00000000 11111011 11111111 00000000 00000000  ......
000002a6: 00000001 00000000 00000010 00000000 00000001 00000000  ......
000002ac: 11111101 11111111 11111110 11111111 11111100 11111111  ......
000002b2: 11111100 11111111 11111101 11111111 11111101 11111111  ......
000002b8: 00000001 00000000 00000010 00000000 11111100 11111111  ......
000002be: 11111100 11111111 11111011 11111111 11111010 11111111  ......
000002c4: 00000010 00000000 00000010 00000000 00000000 00000000  ......

New File:

000002b2: 00000011 00000000 00000011 00000000 11111110 11111111  ......
000002b8: 11111111 11111111 11111101 11111111 11111011 11111111  ......
000002be: 11111100 11111111 11111110 11111111 00000000 00000000  ......
000002c4: 11111011 11111111 00000000 00000000 00000001 00000000  ......
000002ca: 00000010 00000000 00000001 00000000 11111101 11111111  ......
000002d0: 11111110 11111111 11111100 11111111 11111100 11111111  ......
000002d6: 11111101 11111111 11111101 11111111 00000001 00000000  ......
000002dc: 00000010 00000000 11111100 11111111 11111100 11111111  ......
000002e2: 11111011 11111111 11111010 11111111 00000010 00000000  ......

Why?

Simon Bosley
  • 1,114
  • 3
  • 18
  • 41
Getkey
  • 176
  • 1
  • 9
  • Maybe the WAV file has date/time in the header information? – Simon Bosley Jun 27 '16 at 15:29
  • Yeah I thought about that and ran ExFalso so I can guarantee their ID3 tags are the same. But apparently wav files [can also have RIFF tags](http://wiki.audacityteam.org/wiki/WAV#metadata) and after checking mine have none. – Getkey Jun 27 '16 at 15:59
  • I've been trying to recreate your results, but I cannot. In OS X 10.11.5 I've been using Audacity 2.1.2 to create and export 32-bit wav files as you describe, but they're all identical. I've also used SoX to convert 16-bit wav to flac and back again, but again the files are identical. Maybe this is all caused by some software glitch? – AkselA Jul 01 '16 at 13:40
  • Weird, I use Audacity 2.1.2 too, on Arch Linux. I tried using SoX and the files are identical. The weird behavior was with ffmpeg, which seems not to work as well as SoX apparently. – Getkey Jul 01 '16 at 16:33

0 Answers0