working on sweep validation

This commit is contained in:
Samuel Walker 2025-02-05 16:40:08 -07:00
parent d576bbca55
commit 65e4dbadb5
Signed by: piwalker
GPG Key ID: BE1F84BF85111255
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,7 @@
"ppu.h": "c",
"profileapi.h": "c",
"type_traits": "c",
"xtr1common": "c"
"xtr1common": "c",
"chrono": "c"
}
}

View File

@ -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();