fix wavetable to sample not using full range
This commit is contained in:
parent
cb42641200
commit
3d9f1b7f5c
1 changed files with 2 additions and 2 deletions
|
|
@ -933,10 +933,10 @@ void FurnaceGUI::doAction(int what) {
|
|||
sample->loopEnd=waveLen;
|
||||
sample->loop=true;
|
||||
sample->loopMode=DIV_SAMPLE_LOOP_FORWARD;
|
||||
sample->depth=DIV_SAMPLE_DEPTH_8BIT;
|
||||
sample->depth=DIV_SAMPLE_DEPTH_16BIT;
|
||||
if (sample->init(waveLen)) {
|
||||
for (unsigned short i=0; i<waveLen; i++) {
|
||||
sample->data8[i]=((wave->data[i]*256)/(wave->max+1))-128;
|
||||
sample->data16[i]=((wave->data[i]*65535.0f)/(wave->max))-32768;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue