SoundUnit: ring modulation

This commit is contained in:
tildearrow 2022-04-27 22:57:36 -05:00
parent ff33eed2fd
commit f2b974acc5
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@ void SoundUnit::NextSample(short* l, short* r) {
ns[i]=((((cycle[i]>>15)&127)>chan[i].duty)*127)^(short)SCtriangle[(cycle[i]>>14)&255];
break;
}
if (chan[i].flags.ring) {
ns[i]=(ns[i]*ns[(i+1)&7])>>7;
}
if (chan[i].flags.pcm) {
if (chan[i].freq>0x8000) {