Can't verify flac-wav with wavcrc32-gui

Music Converter | CD Ripper | Disc Burner
General discussion / Request help

Moderator: poiko

Post Reply
Alien
New User
Posts: 3
Joined: Sun May 12, 2019 8:41 pm
Contact:

Can't verify flac-wav with wavcrc32-gui

Post by Alien » Sun May 12, 2019 8:47 pm

When converting flac-wav, the wav file when checking the CRC does not match the original. The wavcrc32-gui programma cannot calculate the CRC of the file after conversion at all. Version 8.2.2.1 and Free.

User avatar
poiko
Site Admin
Site Admin
Posts: 3823
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: Can't verify flac-wav with wavcrc32-gui

Post by poiko » Mon May 13, 2019 1:53 pm

Alien wrote: When converting flac-wav, the wav file when checking the CRC does not match the original. The wavcrc32-gui programma cannot calculate the CRC of the file after conversion at all. Version 8.2.2.1 and Free.
How can you say the CRC does not match the original if wavcrc32 does not even calculate it for you ?

The utility (wavcrc32) is faulty and does not properly support the WAV format.

This is wavcrc32 source code:
/*
Checks RIFF header in WAV file on validness
*/
unsigned int CheckRIFFHeader(FILE* f)
{
if (!CheckDWORD(f, 0x00, 0x46464952, "*** non-RIFF format!")) return 0;
if (!CheckDWORD(f, 0x08, 0x45564157, "*** non-WAVE format!")) return 0;
if (!CheckDWORD(f, 0x0C, 0x20746d66, "*** cannot find format chunk!")) return 0;
if (!CheckDWORD(f, 0x10, 0x00000010, "*** invalid format chunk size!")) return 0;
if (!CheckDWORD(f, 0x14, 0x00020001, "*** invalid audio format!")) return 0;
if (!CheckDWORD(f, 0x24, 0x61746164, "*** cannot find data chunk!")) return 0;

unsigned int dwDataSize = 0;
fseek(f, 0x28, SEEK_SET);
fread(&dwDataSize, 1, 4, f);
return dwDataSize;
}
WAV consists of chunks and you can't use constant offset to find the audio data chunk.

You can use e.g. Foobar2000's Utilities / Verify Integrity that shows the MD5 and CRC32 for both FLAC and WAV formats.

This is a screenshot of Foobar2000, showing FLAC+WAV check sums of two FLAC+WAV sets with different audio formats:
Untitled-1.png
Untitled-1.png (17.3 KiB) Viewed 103 times

Alien
New User
Posts: 3
Joined: Sun May 12, 2019 8:41 pm
Contact:

Re: Can't verify flac-wav with wavcrc32-gui

Post by Alien » Mon May 13, 2019 8:46 pm

EZ CD Audio Converter when converting WAV-FLAC-WAV changes the source WAV file and their CRC stops to coincide.
In addition, wavcrc32-gui generally stops opening such WAV files. These are facts. This started to happen at least in version 8.2.2 and FREE.
The FLAC codec does not change the WAV, the EZ CD Audio Converter itself remains, it makes some changes to the original WAV.
foobar2000 really considers the CRC of a WAV file the same. But it is still not clear why EZ CD Audio Converter changes the WAV header as a result, the usual check of CRC files are different.

User avatar
poiko
Site Admin
Site Admin
Posts: 3823
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: Can't verify flac-wav with wavcrc32-gui

Post by poiko » Tue May 14, 2019 2:15 pm

Alien wrote: EZ CD Audio Converter when converting WAV-FLAC-WAV changes the source WAV file and their CRC stops to coincide.
No they do not. Your wavcrc32 utility just don't parse the WAV file correctly.
Alien wrote:In addition, wavcrc32-gui generally stops opening such WAV files.
You can enable the WAV compatibility mode and your utility works.
Untitled-1.png
Untitled-1.png (20.53 KiB) Viewed 76 times

Alien
New User
Posts: 3
Joined: Sun May 12, 2019 8:41 pm
Contact:

Re: Can't verify flac-wav with wavcrc32-gui

Post by Alien » Tue May 14, 2019 8:49 pm

poiko wrote:No they do not. Your wavcrc32 utility just don't parse the WAV file correctly.
I agree, but when you change the header and other CRC utilities for general file analysis, they start analyzing BAB files so that the CRC does not match.
poiko wrote:You can enable the WAV compatibility mode and your utility works.
Thank you, this option completely solved my problem. Now CRC CD of images after unpacking from FLAC fully coincides with the CRC specified in the .log file.

Post Reply