ft2-clone

Fasttracker 2 clone
Log | Files | Refs | README | LICENSE

commit fa8fc530f8604c935804008cec6e2c89702c6f18
parent 0c1f9008cbcd43eaae3f396c6d0a4d1b035586fd
Author: Olav Sørensen <olav.sorensen@live.no>
Date:   Sun,  6 Sep 2020 11:15:27 +0200

Bugfix in v1.32 for playing empty patterns

Diffstat:
Msrc/ft2_replayer.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git 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 @@ void tickReplayer(void) // periodically called from audio callback 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]; }