summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2020-02-18 22:32:27 -0800
committerDiegoisawesome <diego@domoreaweso.me>2020-02-18 22:32:27 -0800
commit4dd4c4d077191d7d287ce94a37c19368b5880eb0 (patch)
treee5c2ccab379b3ffa739f88a6db9175ed68066c23
parent059e5467f7395c125ec6dcc808b368a5a51feac9 (diff)
Allow INST chunk loops without MARK chunk
-rw-r--r--tools/aif2pcm/main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tools/aif2pcm/main.c b/tools/aif2pcm/main.c
index 714c71343..7cc361d65 100644
--- a/tools/aif2pcm/main.c
+++ b/tools/aif2pcm/main.c
@@ -272,13 +272,8 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
unsigned short loop_type = (aif->data[pos++] << 8);
loop_type |= (uint8_t)aif->data[pos++];
- if (loop_type)
+ if (loop_type && markers)
{
- if (!markers)
- {
- FATAL_ERROR("INST chunk loop without MARK chunk in file!\n");
- }
-
unsigned short marker_id = (aif->data[pos++] << 8);
marker_id |= (uint8_t)aif->data[pos++];
@@ -317,7 +312,7 @@ void read_aif(struct Bytes *aif, AifData *aif_data)
else
{
// Skip NoLooping sustain loop.
- pos += 6;
+ pos += 4;
}
// Skip release loop, we don't need it.