Y8950/YMU759: ADPCM muting

This commit is contained in:
tildearrow 2022-05-13 17:40:05 -05:00
parent 315018ff24
commit 1ffbfe17d4
1 changed files with 8 additions and 3 deletions

View File

@ -285,9 +285,13 @@ void DivPlatformOPL::acquire_nuked(short* bufL, short* bufR, size_t start, size_
aOut.clear();
adpcmB->output<2>(aOut,0);
os[0]+=aOut.data[0];
os[1]+=aOut.data[0];
oscBuf[adpcmChan]->data[oscBuf[adpcmChan]->needle++]+=aOut.data[0];
if (!isMuted[adpcmChan]) {
os[0]+=aOut.data[0];
os[1]+=aOut.data[0];
oscBuf[adpcmChan]->data[oscBuf[adpcmChan]->needle++]+=aOut.data[0];
} else {
oscBuf[adpcmChan]->data[oscBuf[adpcmChan]->needle++]=0;
}
}
for (int i=0; i<chans; i++) {
@ -668,6 +672,7 @@ int DivPlatformOPL::toFreq(int freq) {
void DivPlatformOPL::muteChannel(int ch, bool mute) {
isMuted[ch]=mute;
if (ch==adpcmChan) return;
if (oplType<3 && ch<melodicChans) {
fm.channel[outChanMap[ch]].muted=mute;
}