Change SIDFX state machine reset

This commit is contained in:
drmortalwombat 2025-06-06 20:00:38 +02:00
parent f98665c577
commit 13c90eb542
2 changed files with 8 additions and 1 deletions

View File

@ -35,6 +35,11 @@ bool sidfx_idle(byte chn)
return channels[chn].state == SIDFX_IDLE;
}
char sidfx_cnt(byte chn)
{
return channels[chn].cnt;
}
void sidfx_play(byte chn, const SIDFX * fx, byte cnt)
{
SIDFXState ns = channels[chn].state;
@ -158,7 +163,7 @@ inline void sidfx_loop_ch(byte ch)
channels[ch].cnt--;
channels[ch].com = com;
channels[ch].priority = com->priority;
if (com->time0)
if (com->time1)
channels[ch].state = SIDFX_RESET_0;
else
channels[ch].state = SIDFX_READY;

View File

@ -20,6 +20,8 @@ inline void sidfx_play(byte chn, const SIDFX * fx, byte cnt);
void sidfx_stop(byte chn);
char sidfx_cnt(byte chn);
void sidfx_loop(void);
void sidfx_loop_2(void);