Get remaining time
in sound-card
(RemTime) [ms]
RemTime <
(BufDelay + 9)
dT=5 ms
Initial values:
BufDelay = 80 [ms]
waitCount = 1700
minPlayBufDelay = 25
intro = 1
RemTime >
(BufDelay + 9)
dT=2ms
remZeroCount=0
waitCount > 2000
waitCount++
PlayProc() is called on
average each 10 ms.
dT_avg = 10 [ms]
_intro = 0
BufDelay--
waitCounter = 1990
RemTime == 0
RemTime <
minPlayBufDelay
RemTime <
(BufDelay - 9)
waitCount > 30
remZeroCount++
remZeroCount==2
remZeroCount==3
BufDelay += 15
minBufDelay += 20
waitCount = 50
remZeroCount = 0
BufDelay += 30
minBufDelay += 25
waitCounter = 0
minBufDelay += 10
BufDelay += 15
waitCounter = 50
waitCount > 30
BufDelay+=10
intro==0
waitCount=0
remZeroCount=0
dT=10ms
remZeroCount=0
Write data
minBufDelay >
MAX_minDelay
minBufDelay = MAX_minDelay
return
dT
BufDelay
BufDelay > 150
BufDelay = 150
BufDelay < minBufDelay
BufDelay = minBufDelay
true
false
Yes
false
false
false
true
true
true
false
true
false
true
true
true
true
false
false
true
true
false
true
false
false
false
true