I think this is probably because of the smoothingTimeConstant
of your AnalyserNode
, which defaults to 0.8
.
My guess is that because of this averaging over time, when you pause the <audio>
element, the values will gradually decay toward -Infinity
.
Anyway, that's just a guess, but I'd say I'm about 95% sure. You could verify it pretty easily be setting analyser.smoothingTimeConstant = 0
and seeing if the behavior persists.
Oh, and here's a link to the relevant portion of the spec.: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#dfn-smoothingTimeConstant