MCPcopy Create free account
hub / github.com/cloudflare/meet / tick

Function tick

app/utils/monitorAudioLevel.ts:31–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29 }, intervalMs)
30
31 const tick = () => {
32 timeout = window.setTimeout(() => {
33 analyserNode.getFloatTimeDomainData(pcmData)
34 let sumSquares = 0.0
35 for (const amplitude of pcmData) {
36 sumSquares += amplitude * amplitude
37 }
38 const current = Math.sqrt(sumSquares / pcmData.length)
39 if (current > peak) {
40 peak = current
41 }
42 tick()
43 })
44 }
45 tick()
46
47 return () => {

Callers 1

monitorAudioLevelFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected