diff --git a/src/hardware/cmos.cpp b/src/hardware/cmos.cpp index 26a0e79f..35f3df88 100644 --- a/src/hardware/cmos.cpp +++ b/src/hardware/cmos.cpp @@ -68,7 +68,8 @@ static void cmos_checktimer(void) { LOG(LOG_PIT,LOG_NORMAL)("RTC Timer at %.2f hz",1000.0/cmos.timer.delay); // PIC_AddEvent(cmos_timerevent,cmos.timer.delay); /* A rtc is always running */ - PIC_AddEvent(cmos_timerevent,(double)cmos.timer.delay-fmod(PIC_FullIndex(),(double)cmos.timer.delay)); //Should be more like a real pc. Check + double remd=fmod(PIC_FullIndex(),(double)cmos.timer.delay); + PIC_AddEvent(cmos_timerevent,(float)((double)cmos.timer.delay-remd)); //Should be more like a real pc. Check // status reg A reading with this (and with other delays actually) } diff --git a/src/hardware/opl.cpp b/src/hardware/opl.cpp index b179a037..d09a79b6 100644 --- a/src/hardware/opl.cpp +++ b/src/hardware/opl.cpp @@ -62,7 +62,7 @@ static const fltype frqmul_tab[16] = { 0.5,1,2,3,4,5,6,7,8,9,10,10,12,12,15,15 }; // calculated frequency multiplication values (depend on sampling rate) -static float frqmul[16]; +static fltype frqmul[16]; // key scale levels static Bit8u kslev[8][16];