Fix wave and null device calculations when the timer wraps
This commit is contained in:
+1
-1
@@ -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
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user