diff --git a/.vscode/settings.json b/.vscode/settings.json index 34ac8c4..44636c6 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,6 +7,7 @@ "ppu.h": "c", "profileapi.h": "c", "type_traits": "c", - "xtr1common": "c" + "xtr1common": "c", + "chrono": "c" } } \ No newline at end of file diff --git a/lib/audio.c b/lib/audio.c index 23f0a9b..f03041f 100644 --- a/lib/audio.c +++ b/lib/audio.c @@ -373,9 +373,9 @@ void audio_tick(){ } - if((prev_ticks & (1 << 1)) && !(ticks & (1 << 1))) { + if((prev_ticks & (1 << 1)) && !(ticks & (1 << 1)) && ctx.sq1_sweep_enabled) { ctx.sq1_sweep_timer++; - if(ctx.sq1_sweep_timer >= ctx.sq1_sweep_pace) { + if((ctx.sq1_sweep_timer >= ctx.sq1_sweep_pace && ctx.sq1_sweep_pace > 0) || (ctx.sq1_sweep_timer >= 8 && ctx.sq1_sweep_pace == 0)) { ctx.sq1_sweep_timer = 0; if(ctx.sq1_enable && ctx.sq1_sweep_pace > 0 && ctx.sq1_sweep_enabled){ sq1_sweep();