limit volume macro to system maximum

fixes #71
This commit is contained in:
tildearrow 2022-01-30 12:31:50 -05:00
parent de5327d89a
commit 822d542350
12 changed files with 16 additions and 16 deletions

View file

@ -37,7 +37,7 @@ void DivPlatformSAA1099::tick() {
for (int i=0; i<6; i++) {
chan[i].std.next();
if (chan[i].std.hadVol) {
chan[i].outVol=chan[i].std.vol-(15-(chan[i].vol&15));
chan[i].outVol=MIN(15,chan[i].std.vol)-(15-(chan[i].vol&15));
if (chan[i].outVol<0) chan[i].outVol=0;
if (isMuted[i]) {
rWrite(i,0);