mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-22 20:45:11 +00:00
even. more. volume. slide. fixes.
so it happens on >volMax too amazing
This commit is contained in:
parent
38b16fe5ae
commit
ccd5acf1e4
2 changed files with 3 additions and 2 deletions
|
@ -698,7 +698,7 @@ bool DivEngine::init() {
|
|||
blip_set_rates(bb[1],dispatch->rate,got.rate);
|
||||
|
||||
for (int i=0; i<chans; i++) {
|
||||
chan[i].volMax=dispatch->dispatch(DivCommand(DIV_CMD_GET_VOLMAX,i))<<8;
|
||||
chan[i].volMax=(dispatch->dispatch(DivCommand(DIV_CMD_GET_VOLMAX,i))<<8)|0xff;
|
||||
chan[i].volume=chan[i].volMax;
|
||||
}
|
||||
|
||||
|
|
|
@ -348,10 +348,11 @@ void DivEngine::nextTick() {
|
|||
chan[i].volume+=chan[i].volSpeed;
|
||||
if (chan[i].volume>chan[i].volMax) {
|
||||
chan[i].volume=chan[i].volMax;
|
||||
chan[i].volSpeed=0;
|
||||
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
|
||||
} else if (chan[i].volume<0) {
|
||||
chan[i].volSpeed=0;
|
||||
chan[i].volume=chan[i].volMax+0x100;
|
||||
chan[i].volume=chan[i].volMax+1;
|
||||
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
|
||||
} else {
|
||||
dispatch->dispatch(DivCommand(DIV_CMD_VOLUME,i,chan[i].volume>>8));
|
||||
|
|
Loading…
Reference in a new issue