long long -> int64_t
This commit is contained in:
parent
572d826fb1
commit
1bdbd640ec
|
@ -49,13 +49,13 @@ void DivPlatformGBAMinMod::acquire(short** buf, size_t len) {
|
||||||
bool newSamp=true;
|
bool newSamp=true;
|
||||||
// cache channel registers that might change
|
// cache channel registers that might change
|
||||||
struct {
|
struct {
|
||||||
unsigned long long address;
|
uint64_t address;
|
||||||
unsigned int freq, loopEnd, loopStart;
|
unsigned int freq, loopEnd, loopStart;
|
||||||
short volL, volR;
|
short volL, volR;
|
||||||
} chState[16];
|
} chState[16];
|
||||||
for (int i=0; i<chanMax; i++) {
|
for (int i=0; i<chanMax; i++) {
|
||||||
unsigned short* chReg=®Pool[i*16];
|
unsigned short* chReg=®Pool[i*16];
|
||||||
chState[i].address=chReg[0]|((unsigned long long)chReg[1]<<16)|((unsigned long long)chReg[2]<<32)|((unsigned long long)chReg[3]<<48);
|
chState[i].address=chReg[0]|((uint64_t)chReg[1]<<16)|((uint64_t)chReg[2]<<32)|((uint64_t)chReg[3]<<48);
|
||||||
chState[i].freq=chReg[8]|((unsigned int)chReg[9]<<16);
|
chState[i].freq=chReg[8]|((unsigned int)chReg[9]<<16);
|
||||||
chState[i].loopEnd=chReg[10]|((unsigned int)chReg[11]<<16);
|
chState[i].loopEnd=chReg[10]|((unsigned int)chReg[11]<<16);
|
||||||
chState[i].loopStart=chReg[12]|((unsigned int)chReg[13]<<16);
|
chState[i].loopStart=chReg[12]|((unsigned int)chReg[13]<<16);
|
||||||
|
@ -74,12 +74,12 @@ void DivPlatformGBAMinMod::acquire(short** buf, size_t len) {
|
||||||
for (int i=0; i<chanMax; i++) {
|
for (int i=0; i<chanMax; i++) {
|
||||||
for (size_t j=mixBufOffset; j<4; j++) {
|
for (size_t j=mixBufOffset; j<4; j++) {
|
||||||
unsigned int lastAddr=chState[i].address>>32;
|
unsigned int lastAddr=chState[i].address>>32;
|
||||||
chState[i].address+=((unsigned long long)chState[i].freq)<<8;
|
chState[i].address+=((uint64_t)chState[i].freq)<<8;
|
||||||
unsigned int newAddr=chState[i].address>>32;
|
unsigned int newAddr=chState[i].address>>32;
|
||||||
if (newAddr!=lastAddr) {
|
if (newAddr!=lastAddr) {
|
||||||
if (newAddr>=chState[i].loopEnd) {
|
if (newAddr>=chState[i].loopEnd) {
|
||||||
newAddr=newAddr-chState[i].loopEnd+chState[i].loopStart;
|
newAddr=newAddr-chState[i].loopEnd+chState[i].loopStart;
|
||||||
chState[i].address=(chState[i].address&0xffffffff)|((unsigned long long)newAddr<<32);
|
chState[i].address=(chState[i].address&0xffffffff)|((uint64_t)newAddr<<32);
|
||||||
}
|
}
|
||||||
int newSamp=0;
|
int newSamp=0;
|
||||||
switch (newAddr>>24) {
|
switch (newAddr>>24) {
|
||||||
|
@ -573,7 +573,7 @@ DivSamplePos DivPlatformGBAMinMod::getSamplePos(int ch) {
|
||||||
return DivSamplePos(
|
return DivSamplePos(
|
||||||
chan[ch].sample,
|
chan[ch].sample,
|
||||||
(((int)regPool[ch*16+2]|((int)regPool[ch*16+3]<<16))&0x01ffffff)-sampleOff[chan[ch].sample],
|
(((int)regPool[ch*16+2]|((int)regPool[ch*16+3]<<16))&0x01ffffff)-sampleOff[chan[ch].sample],
|
||||||
(long long)chan[ch].freq*chipClock/CHIP_FREQBASE
|
(int64_t)chan[ch].freq*chipClock/CHIP_FREQBASE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue