From a93ff6ef3c24856cd0d05d89cf8d7c051bdc25e6 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 3 Mar 2012 08:47:23 -0800 Subject: Slight correction for handling the null backend's timer wrapping --- Alc/backends/null.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/backends/null.c') diff --git a/Alc/backends/null.c b/Alc/backends/null.c index 8e581f15..10068630 100644 --- a/Alc/backends/null.c +++ b/Alc/backends/null.c @@ -52,9 +52,9 @@ static ALuint NullProc(ALvoid *ptr) avail = (ALuint64)(now-start) * Device->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*Device->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)*Device->Frequency/1000 - done; done = 0; } if(avail-done < Device->UpdateSize) -- cgit v1.2.3