diff --git a/src/engine/platform/gbaminmod.cpp b/src/engine/platform/gbaminmod.cpp index 2ad6713b4..a1ad0efe0 100644 --- a/src/engine/platform/gbaminmod.cpp +++ b/src/engine/platform/gbaminmod.cpp @@ -49,13 +49,13 @@ void DivPlatformGBAMinMod::acquire(short** buf, size_t len) { bool newSamp=true; // cache channel registers that might change struct { - unsigned long long address; + uint64_t address; unsigned int freq, loopEnd, loopStart; short volL, volR; } chState[16]; for (int i=0; i>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; if (newAddr!=lastAddr) { if (newAddr>=chState[i].loopEnd) { 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; switch (newAddr>>24) { @@ -573,7 +573,7 @@ DivSamplePos DivPlatformGBAMinMod::getSamplePos(int ch) { return DivSamplePos( 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 ); }