diff options
author | Chris Robinson <[email protected]> | 2012-03-03 08:50:15 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-03-03 08:50:15 -0800 |
commit | 49433c2074c57eb996f78e32869b3069799560d6 (patch) | |
tree | 0c55ead68b9ed8318b2614f3c6661fe52cd96b33 /Alc/backends/wave.c | |
parent | a93ff6ef3c24856cd0d05d89cf8d7c051bdc25e6 (diff) |
Slight correction for handling the wave writer backend's timer wrapping
Diffstat (limited to 'Alc/backends/wave.c')
-rw-r--r-- | Alc/backends/wave.c | 6 |
1 files 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) |