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

@ -53,7 +53,7 @@ void DivPlatformAmiga::tick() {
for (int i=0; i<4; i++) {
chan[i].std.next();
if (chan[i].std.hadVol) {
chan[i].outVol=((chan[i].vol%65)*chan[i].std.vol)>>6;
chan[i].outVol=((chan[i].vol%65)*MIN(64,chan[i].std.vol))>>6;
}
if (chan[i].std.hadArp) {
if (!chan[i].inPorta) {
@ -263,4 +263,4 @@ int DivPlatformAmiga::init(DivEngine* p, int channels, int sugRate, unsigned int
}
void DivPlatformAmiga::quit() {
}
}