ref: fa8fc530f8604c935804008cec6e2c89702c6f18
parent: 0c1f9008cbcd43eaae3f396c6d0a4d1b035586fd
author: Olav Sørensen <olav.sorensen@live.no>
date: Sun Sep 6 07:15:54 EDT 2020
Bugfix in v1.32 for playing empty patterns
--- a/src/ft2_replayer.c
+++ b/src/ft2_replayer.c
@@ -30,9 +30,8 @@
// non-FT2 precalced stuff
static double dPeriod2HzTab[65536], dLogTab[768], dHz2MixDeltaMul;
static uint32_t revMixDeltaTab[65536];
-
static bool bxxOverflow;
-static tonTyp nilPatternLine;
+static tonTyp nilPatternLine[MAX_VOICES];
// globally accessed
@@ -2129,11 +2128,11 @@
const bool readNewNote = tickZero && song.pattDelTime2 == 0;
if (readNewNote)
{
- const tonTyp *pattPtr = &nilPatternLine;
+ const tonTyp *pattPtr = nilPatternLine;
if (patt[song.pattNr] != NULL)
{
assert(song.pattNr >= 0 && song.pattNr < MAX_PATTERNS &&
- song.pattPos >= 0 && song.pattPos < MAX_PATT_LEN);
+ song.pattPos >= 0 && song.pattPos < MAX_PATT_LEN);
pattPtr = &patt[song.pattNr][song.pattPos * MAX_VOICES];
}