PLENTY OF TODO WHEN I COME BACK
CRASHES EVERYWHERE
This commit is contained in:
parent
148d537a18
commit
a6e4345863
28 changed files with 141 additions and 127 deletions
|
|
@ -122,6 +122,9 @@ void DivPlatformRF5C68::tick(bool sysTick) {
|
|||
} else {
|
||||
chan[i].audPos=0;
|
||||
}
|
||||
// TODO: BANG BANG BANG
|
||||
// AAAAAAAAAAAAAAAAAAA
|
||||
// ASGDJFJFSDGL;ASDHFKJLSHFLKAJSFHKLJVSJ
|
||||
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff) {
|
||||
unsigned char keyon=regPool[8]&~(1<<i);
|
||||
unsigned char keyoff=keyon|(1<<i);
|
||||
|
|
@ -130,7 +133,7 @@ void DivPlatformRF5C68::tick(bool sysTick) {
|
|||
chan[i].freq=(int)(off*parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2,chipClock,CHIP_FREQBASE));
|
||||
if (chan[i].freq>65535) chan[i].freq=65535;
|
||||
if (chan[i].keyOn) {
|
||||
unsigned int start=s->offRF5C68;
|
||||
unsigned int start=sampleOffRFC[chan[i].sample];
|
||||
unsigned int loop=start+s->length8;
|
||||
if (chan[i].audPos>0) {
|
||||
start=start+MIN(chan[i].audPos,s->length8);
|
||||
|
|
@ -383,6 +386,7 @@ size_t DivPlatformRF5C68::getSampleMemUsage(int index) {
|
|||
|
||||
void DivPlatformRF5C68::renderSamples() {
|
||||
memset(sampleMem,0,getSampleMemCapacity());
|
||||
memset(sampleOffRFC,0,256*sizeof(unsigned int));
|
||||
|
||||
size_t memPos=0;
|
||||
for (int i=0; i<parent->song.sampleLen; i++) {
|
||||
|
|
@ -390,7 +394,7 @@ void DivPlatformRF5C68::renderSamples() {
|
|||
int length=s->getLoopEndPosition(DIV_SAMPLE_DEPTH_8BIT);
|
||||
int actualLength=MIN((int)(getSampleMemCapacity()-memPos)-31,length);
|
||||
if (actualLength>0) {
|
||||
s->offRF5C68=memPos;
|
||||
sampleOffRFC[i]=memPos;
|
||||
for (int j=0; j<actualLength; j++) {
|
||||
// convert to signed magnitude
|
||||
signed char val=s->data8[j];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue