diff options
author | Simon Howard | 2014-10-24 19:48:01 -0400 |
---|---|---|
committer | Simon Howard | 2014-10-24 19:48:01 -0400 |
commit | 9c480b1cb18544240f433f90fca7e489eae35aff (patch) | |
tree | 15520e25cd3f8d6603b3ee4a18bb0d4af73bdc24 /src | |
parent | 5616ae0648ae9e11b3d9f4c889adecf0e6628a99 (diff) | |
download | chocolate-doom-9c480b1cb18544240f433f90fca7e489eae35aff.tar.gz chocolate-doom-9c480b1cb18544240f433f90fca7e489eae35aff.tar.bz2 chocolate-doom-9c480b1cb18544240f433f90fca7e489eae35aff.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/i_sdlmusic.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 |