Change SIDFX state machine reset
This commit is contained in:
parent
f98665c577
commit
13c90eb542
|
@ -35,6 +35,11 @@ bool sidfx_idle(byte chn)
|
||||||
return channels[chn].state == SIDFX_IDLE;
|
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)
|
void sidfx_play(byte chn, const SIDFX * fx, byte cnt)
|
||||||
{
|
{
|
||||||
SIDFXState ns = channels[chn].state;
|
SIDFXState ns = channels[chn].state;
|
||||||
|
@ -158,7 +163,7 @@ inline void sidfx_loop_ch(byte ch)
|
||||||
channels[ch].cnt--;
|
channels[ch].cnt--;
|
||||||
channels[ch].com = com;
|
channels[ch].com = com;
|
||||||
channels[ch].priority = com->priority;
|
channels[ch].priority = com->priority;
|
||||||
if (com->time0)
|
if (com->time1)
|
||||||
channels[ch].state = SIDFX_RESET_0;
|
channels[ch].state = SIDFX_RESET_0;
|
||||||
else
|
else
|
||||||
channels[ch].state = SIDFX_READY;
|
channels[ch].state = SIDFX_READY;
|
||||||
|
|
|
@ -20,6 +20,8 @@ inline void sidfx_play(byte chn, const SIDFX * fx, byte cnt);
|
||||||
|
|
||||||
void sidfx_stop(byte chn);
|
void sidfx_stop(byte chn);
|
||||||
|
|
||||||
|
char sidfx_cnt(byte chn);
|
||||||
|
|
||||||
void sidfx_loop(void);
|
void sidfx_loop(void);
|
||||||
|
|
||||||
void sidfx_loop_2(void);
|
void sidfx_loop_2(void);
|
||||||
|
|
Loading…
Reference in New Issue