changes to sample rate storage

as of now we store and use the actual sample rate as opposed to an index
fo a fixed rate table.

this allows for more flexibility in a future file format...
This commit is contained in:
tildearrow 2021-12-23 18:04:44 -05:00
parent 830e880a57
commit 7ba8607270
9 changed files with 66 additions and 49 deletions

View file

@ -5,9 +5,6 @@
#include "genesisshared.h"
static int dacRates[6]={
160,160,116,80,58,40
};
static unsigned char konOffs[6]={
0, 1, 2, 4, 5, 6
};
@ -179,7 +176,7 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
}
dacPos=0;
dacPeriod=0;
dacRate=dacRates[parent->song.sample[dacSample]->rate];
dacRate=1280000/parent->song.sample[dacSample]->rate;
break;
}
DivInstrument* ins=parent->getIns(chan[c.chan].ins);