aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/wave.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/wave.c')
-rw-r--r--Alc/wave.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/Alc/wave.c b/Alc/wave.c
index 1f25d7f2..f8921c64 100644
--- a/Alc/wave.c
+++ b/Alc/wave.c
@@ -106,9 +106,10 @@ static ALuint WaveProc(ALvoid *ptr)
avail = (ALuint64)(now-start) * pDevice->Frequency / 1000;
if(avail < done)
{
- AL_PRINT("Timer wrapped\n");
- aluHandleDisconnect(pDevice);
- break;
+ /* 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;
+ done = 0;
}
if(avail-done < pDevice->UpdateSize)
{