From 49433c2074c57eb996f78e32869b3069799560d6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 3 Mar 2012 08:50:15 -0800 Subject: Slight correction for handling the wave writer backend's timer wrapping --- Alc/backends/wave.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Alc/backends/wave.c b/Alc/backends/wave.c index 5ef363d3..ad187896 100644 --- a/Alc/backends/wave.c +++ b/Alc/backends/wave.c @@ -101,9 +101,9 @@ static ALuint WaveProc(ALvoid *ptr) avail = (ALuint64)(now-start) * pDevice->Frequency / 1000; if(avail < done) { - /* Timer wrapped. Add the remainder of the cycle to the available - * count and reset the number of samples done */ - avail += (ALuint64)0xFFFFFFFFu*pDevice->Frequency/1000 - done; + /* Timer wrapped (50 days???). Add the remainder of the cycle to + * the available count and reset the number of samples done */ + avail += ((ALuint64)1<<32)*pDevice->Frequency/1000 - done; done = 0; } if(avail-done < pDevice->UpdateSize) -- cgit v1.2.3