Fix wave and null device calculations when the timer wraps

This commit is contained in:
Chris Robinson
2010-12-03 23:48:59 -08:00
parent 1b7be672fa
commit 191803ad53
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ static ALuint NullProc(ALvoid *ptr)
{
/* Timer wrapped. Add the remainder of the cycle to the available
* count and reset the number of samples done */
avail += 0xFFFFFFFFu*Device->Frequency/1000 - done;
avail += (ALuint64)0xFFFFFFFFu*Device->Frequency/1000 - done;
done = 0;
}
if(avail-done < Device->UpdateSize)
+1 -1
View File
@@ -108,7 +108,7 @@ static ALuint WaveProc(ALvoid *ptr)
{
/* Timer wrapped. Add the remainder of the cycle to the available
* count and reset the number of samples done */
avail += 0xFFFFFFFFu*pDevice->Frequency/1000 - done;
avail += (ALuint64)0xFFFFFFFFu*pDevice->Frequency/1000 - done;
done = 0;
}
if(avail-done < pDevice->UpdateSize)