waveform width/height controls
This commit is contained in:
parent
02b5b05e04
commit
5637639950
5 changed files with 47 additions and 7 deletions
|
|
@ -19,8 +19,13 @@ void DivPlatformGB::updateWave() {
|
|||
DivWavetable* wt=parent->getWave(chan[2].wave);
|
||||
rWrite(0x1a,0);
|
||||
for (int i=0; i<16; i++) {
|
||||
unsigned char next=((wt->data[i*2]&15)<<4)|(wt->data[1+i*2]&15);
|
||||
rWrite(0x30+i,next);
|
||||
if (wt->max<1 || wt->len<1) {
|
||||
rWrite(0x30+i,0);
|
||||
} else {
|
||||
unsigned char nibble1=(wt->data[(i*2)*wt->len/32]*15)/wt->max;
|
||||
unsigned char nibble2=(wt->data[(1+i*2)*wt->len/32]*15)/wt->max;
|
||||
rWrite(0x30+i,(nibble1<<4)|nibble2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue