From 2a50d66ecdc10f539d144787e803b536a5f75d37 Mon Sep 17 00:00:00 2001 From: "BADIM-PC\\Vadim" Date: Tue, 19 Dec 2017 17:05:08 +0300 Subject: [PATCH] Silent note bug #449 --- src/tic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tic.c b/src/tic.c index 5623691..6957114 100644 --- a/src/tic.c +++ b/src/tic.c @@ -1111,7 +1111,7 @@ static void processMusic(tic_mem* memory) if(machine->state.music.play == MusicStop) return; const tic_track* track = &machine->sound.music->tracks.data[memory->ram.music_pos.track]; - s32 row = machine->state.music.ticks++ * (track->tempo + DEFAULT_TEMPO) * DEFAULT_SPEED / (track->speed + DEFAULT_SPEED) / NOTES_PER_MUNUTE; + s32 row = machine->state.music.ticks * (track->tempo + DEFAULT_TEMPO) * DEFAULT_SPEED / (track->speed + DEFAULT_SPEED) / NOTES_PER_MUNUTE; s32 rows = MUSIC_PATTERN_ROWS - track->rows; if (row >= rows) @@ -1162,7 +1162,7 @@ static void processMusic(tic_mem* memory) } } - if (row != memory->ram.music_pos.row && row < rows) + if (row != memory->ram.music_pos.row) { memory->ram.music_pos.row = row; @@ -1197,6 +1197,8 @@ static void processMusic(tic_mem* memory) if(c->index >= 0) sfx(memory, c->index, c->freq, c, &memory->ram.registers[i]); } + + machine->state.music.ticks++; } static bool isNoiseWaveform(const tic_waveform* wave)