mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-15 17:25:06 +00:00
qsound: Reduce volume scaling
This commit is contained in:
parent
e4b9a6d1d9
commit
ce3e8c6c6b
1 changed files with 3 additions and 6 deletions
|
@ -281,8 +281,7 @@ void DivPlatformQSound::tick() {
|
||||||
chan[i].outVol=((chan[i].vol&0xff)*MIN(255,chan[i].std.vol<<2))>>8;
|
chan[i].outVol=((chan[i].vol&0xff)*MIN(255,chan[i].std.vol<<2))>>8;
|
||||||
// Check if enabled and write volume
|
// Check if enabled and write volume
|
||||||
if (chan[i].active) {
|
if (chan[i].active) {
|
||||||
rWrite(q1_reg_map[Q1V_VOL][i], chan[i].outVol << 5);
|
rWrite(q1_reg_map[Q1V_VOL][i], chan[i].outVol << 4);
|
||||||
//logW("ch %d vol=%04x (hadVol)!\n",i,chan[i].outVol << 5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint16_t qsound_bank = 0;
|
uint16_t qsound_bank = 0;
|
||||||
|
@ -340,8 +339,7 @@ void DivPlatformQSound::tick() {
|
||||||
//logW("ch %d bank=%04x, addr=%04x, end=%04x, loop=%04x!\n",i,qsound_bank,qsound_addr,qsound_end,qsound_loop);
|
//logW("ch %d bank=%04x, addr=%04x, end=%04x, loop=%04x!\n",i,qsound_bank,qsound_addr,qsound_end,qsound_loop);
|
||||||
// Write sample address. Enable volume
|
// Write sample address. Enable volume
|
||||||
if (!chan[i].std.hadVol) {
|
if (!chan[i].std.hadVol) {
|
||||||
rWrite(q1_reg_map[Q1V_VOL][i], chan[i].vol << 5);
|
rWrite(q1_reg_map[Q1V_VOL][i], chan[i].vol << 4);
|
||||||
//logW("ch %d vol=%04x (!hadVol)!\n",i,chan[i].vol << 5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chan[i].keyOff) {
|
if (chan[i].keyOff) {
|
||||||
|
@ -410,8 +408,7 @@ int DivPlatformQSound::dispatch(DivCommand c) {
|
||||||
// Check if enabled and write volume
|
// Check if enabled and write volume
|
||||||
chan[c.chan].outVol=c.value;
|
chan[c.chan].outVol=c.value;
|
||||||
if (chan[c.chan].active && c.chan < 16) {
|
if (chan[c.chan].active && c.chan < 16) {
|
||||||
rWrite(q1_reg_map[Q1V_VOL][c.chan], chan[c.chan].outVol << 5);
|
rWrite(q1_reg_map[Q1V_VOL][c.chan], chan[c.chan].outVol << 4);
|
||||||
//logW("ch %d vol=%04x (cmd vol)!\n",c.chan,chan[c.chan].outVol << 5);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue