ref: 2b8c2daab5c67ce90aff2a65f330bd4511256428
parent: e9098027b5f2c9ed1cc5a58025e068b2a297e644
author: Olav Sørensen <olav.sorensen@live.no>
date: Fri Jun 12 08:12:33 EDT 2020
Remove unneeded chunk check in WAV loader This makes the loader less picky. Fixes loading of some WAVs with special chunks before the "fmt " chunk.
--- a/src/pt2_header.h
+++ b/src/pt2_header.h
@@ -14,7 +14,7 @@
#include "pt2_unicode.h"
#include "pt2_palette.h"
-#define PROG_VER_STR "1.18"
+#define PROG_VER_STR "1.19"
#ifdef _WIN32
#define DIR_DELIMITER '\\'
--- a/src/pt2_sample_loader.c
+++ b/src/pt2_sample_loader.c
@@ -1757,12 +1757,8 @@
if (ID == 0x45564157) // "WAVE"
{
- fread(&ID, 4, 1, f);
- if (ID == 0x20746D66) // "fmt "
- {
- fclose(f);
- return loadWAVSample(fileName, entryName, -1);
- }
+ fclose(f);
+ return loadWAVSample(fileName, entryName, -1);
}
}
else if (ID == 0x4D524F46) // "FORM"