diff --git a/changelog.txt b/changelog.txt index 7285091a..4b9390a7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,6 @@ ---version 2.0.2 released--- +14-aug-2008 - zeromus - SF [ 2047001 ] Low speeds crash FCEUX 14-aug-2008 - zeromus - SF [ 2050371 ] FCM>FM2 converter should release file handle 13-aug-2008 - zeromus - restore ungzipping (and unzipping in sdl) capability which was lost when archive support was added 13-aug-2008 - zeromus - add FORBID breakpoints - regions which block breakpoints from happening if they contain the PC diff --git a/src/drivers/win/sound.cpp b/src/drivers/win/sound.cpp index e99dd702..307dee71 100644 --- a/src/drivers/win/sound.cpp +++ b/src/drivers/win/sound.cpp @@ -165,16 +165,20 @@ public: //not interpolating! someday it will! int generate(int samples, void *buf) { - int incr = 256; - int bufferSamples = buffers.length>>1; + int64 incr = 256; + int64 bufferSamples = buffers.length>>1; //if we're we're too far behind, playback faster if(bufferSamples > soundrate*3/60) { - int behind = bufferSamples - soundrate/60; + int64 behind = bufferSamples - soundrate/60; incr = behind*256*60/soundrate/2; //we multiply our playback rate by 1/2 the number of frames we're behind } - if(incr<256) printf("OHNO -- %d -- shouldnt be less than 256!\n",incr); //sanity check: should never be less than 256 + if(incr<256) + { + //sanity check: should never be less than 256 + printf("OHNO -- %d -- shouldnt be less than 256!\n",incr); + } incr = (incr*scale)>>8; //apply scaling factor