aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-12-03 23:48:59 -0800
committerChris Robinson <[email protected]>2010-12-03 23:48:59 -0800
commit191803ad53c156d3f056b649c76e441042a385fb (patch)
tree3ccdc05fc3dc4530f5652bef6fb1957b557cf91d /Alc
parent1b7be672faf780db0266f5174af03b12f0a87b35 (diff)
Fix wave and null device calculations when the timer wraps
Diffstat (limited to 'Alc')
-rw-r--r--Alc/null.c2
-rw-r--r--Alc/wave.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Alc/null.c b/Alc/null.c
index beabdc21..fd5cc85a 100644
--- a/Alc/null.c
+++ b/Alc/null.c
@@ -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)
diff --git a/Alc/wave.c b/Alc/wave.c
index f8921c64..03ec08a0 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -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)