mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 08:23:01 +00:00
Y8950: fix mute when using ymfm
This commit is contained in:
parent
b842ce0fe2
commit
0fd86f33c0
1 changed files with 8 additions and 5 deletions
|
@ -1039,7 +1039,7 @@ void DivPlatformOPL::tick(bool sysTick) {
|
||||||
|
|
||||||
if (chan[adpcmChan].std.vol.had) {
|
if (chan[adpcmChan].std.vol.had) {
|
||||||
chan[adpcmChan].outVol=(chan[adpcmChan].vol*MIN(chan[adpcmChan].macroVolMul,chan[adpcmChan].std.vol.val))/chan[adpcmChan].macroVolMul;
|
chan[adpcmChan].outVol=(chan[adpcmChan].vol*MIN(chan[adpcmChan].macroVolMul,chan[adpcmChan].std.vol.val))/chan[adpcmChan].macroVolMul;
|
||||||
immWrite(18,chan[adpcmChan].outVol);
|
immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NEW_ARP_STRAT) {
|
if (NEW_ARP_STRAT) {
|
||||||
|
@ -1217,7 +1217,10 @@ int DivPlatformOPL::toFreq(int freq) {
|
||||||
|
|
||||||
void DivPlatformOPL::muteChannel(int ch, bool mute) {
|
void DivPlatformOPL::muteChannel(int ch, bool mute) {
|
||||||
isMuted[ch]=mute;
|
isMuted[ch]=mute;
|
||||||
if (ch==adpcmChan) return;
|
if (ch==adpcmChan) {
|
||||||
|
immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (oplType<3 && ch<melodicChans) {
|
if (oplType<3 && ch<melodicChans) {
|
||||||
fm.channel[outChanMap[ch]].muted=mute;
|
fm.channel[outChanMap[ch]].muted=mute;
|
||||||
}
|
}
|
||||||
|
@ -1380,7 +1383,7 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
||||||
chan[c.chan].fixedFreq=0;
|
chan[c.chan].fixedFreq=0;
|
||||||
if (!chan[c.chan].std.vol.will) {
|
if (!chan[c.chan].std.vol.will) {
|
||||||
chan[c.chan].outVol=chan[c.chan].vol;
|
chan[c.chan].outVol=chan[c.chan].vol;
|
||||||
immWrite(18,chan[c.chan].outVol);
|
immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol));
|
||||||
}
|
}
|
||||||
if (c.value!=DIV_NOTE_NULL) {
|
if (c.value!=DIV_NOTE_NULL) {
|
||||||
chan[c.chan].sample=ins->amiga.getSample(c.value);
|
chan[c.chan].sample=ins->amiga.getSample(c.value);
|
||||||
|
@ -1511,7 +1514,7 @@ int DivPlatformOPL::dispatch(DivCommand c) {
|
||||||
chan[c.chan].outVol=c.value;
|
chan[c.chan].outVol=c.value;
|
||||||
}
|
}
|
||||||
if (c.chan==adpcmChan) { // ADPCM-B
|
if (c.chan==adpcmChan) { // ADPCM-B
|
||||||
immWrite(18,chan[c.chan].outVol);
|
immWrite(18,(isMuted[adpcmChan]?0:chan[adpcmChan].outVol));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2;
|
int ops=(slots[3][c.chan]!=255 && chan[c.chan].state.ops==4 && oplType==3)?4:2;
|
||||||
|
@ -2243,7 +2246,7 @@ void DivPlatformOPL::reset() {
|
||||||
adpcmB->reset();
|
adpcmB->reset();
|
||||||
|
|
||||||
// volume
|
// volume
|
||||||
immWrite(18,0xff);
|
immWrite(18,(isMuted[adpcmChan]?0:0xff));
|
||||||
// ADPCM limit
|
// ADPCM limit
|
||||||
immWrite(20,0xff);
|
immWrite(20,0xff);
|
||||||
immWrite(19,0xff);
|
immWrite(19,0xff);
|
||||||
|
|
Loading…
Reference in a new issue