From 9c480b1cb18544240f433f90fca7e489eae35aff Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 24 Oct 2014 19:48:01 -0400 Subject: Ignore metadata loop tags if both are zero. If LOOP_START and LOOP_END are both set to zero, ignore them. This is consistent with other source ports. --- src/i_sdlmusic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/i_sdlmusic.c b/src/i_sdlmusic.c index 16c5d517..b8c2b2f7 100644 --- a/src/i_sdlmusic.c +++ b/src/i_sdlmusic.c @@ -405,6 +405,13 @@ static void ReadLoopPoints(char *filename, file_metadata_t *metadata) // Only valid if at the very least we read the sample rate. metadata->valid = metadata->samplerate_hz > 0; + + // If start and end time are both zero, ignore the loop tags. + // This is consistent with other source ports. + if (metadata->start_time == 0 && metadata->end_time == 0) + { + metadata->valid = false; + } } // Given a MUS lump, look up a substitute MUS file to play instead -- cgit v1.2.3