aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Panzenböck <grosser.meister.morti@gmx.net>2011-06-19 06:03:09 +0200
committerMathias Panzenböck <grosser.meister.morti@gmx.net>2011-06-19 06:03:09 +0200
commitb30b8c4ab57cceac8a5731359244a04020c864be (patch)
tree14b2b4c90a04fdf18bb072ffaf37fb7cbfc6acd6
parente09c2c5a19ae3a45eca5891cdf55c4350cc02300 (diff)
IT: no longer allow wrong sample/instrument magic
-rw-r--r--taglib/it/itfile.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/taglib/it/itfile.cpp b/taglib/it/itfile.cpp
index f810ee1d..41266a51 100644
--- a/taglib/it/itfile.cpp
+++ b/taglib/it/itfile.cpp
@@ -168,8 +168,7 @@ void IT::File::read(bool)
seek(instrumentOffset);
ByteVector instrumentMagic = readBlock(4);
- // TODO: find out if it can really be both here and not just IMPI
- READ_ASSERT(instrumentMagic == "IMPS" || instrumentMagic == "IMPI");
+ READ_ASSERT(instrumentMagic == "IMPI");
READ_STRING_AS(dosFileName, 13);
@@ -187,10 +186,13 @@ void IT::File::read(bool)
seek(sampleOffset);
ByteVector sampleMagic = readBlock(4);
- // TODO: find out if it can really be both here and not just IMPS
- READ_ASSERT(sampleMagic == "IMPS" || sampleMagic == "IMPI");
+ READ_ASSERT(sampleMagic == "IMPS");
READ_STRING_AS(dosFileName, 13);
+ // TODO: When cmwt < 0x200 (old format) there are different
+ // (non-string) fileds but they have the same cumulative
+ // size. Because I don't save these fields to anything
+ // (yet) it does not matter.
READ_BYTE_AS(globalVolume);
READ_BYTE_AS(sampleFlags);
READ_BYTE_AS(sampleValume);