MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / countOpenALAudioDataSize

Function countOpenALAudioDataSize

src/memoryprofiler.js:376–386  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

374 },
375
376 countOpenALAudioDataSize() {
377 if (typeof AL == 'undefined' || !AL.currentContext) return 0;
378
379 var totalMemory = 0;
380
381 for (var i in AL.currentContext.buf) {
382 var buffer = AL.currentContext.buf[i];
383 for (var channel = 0; channel < buffer.numberOfChannels; ++channel) totalMemory += buffer.getChannelData(channel).length * 4;
384 }
385 return totalMemory;
386 },
387
388 // Print accurate map of individual allocations. This will show information about
389 // memory fragmentation and allocation sizes.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected