MCPcopy Create free account
hub / github.com/Wscats/chrome-devtools-cli / convertoFloat32ToInt16

Function convertoFloat32ToInt16

src/__tests__/MediaStreamRecorder.js:1595–1603  ·  view source on GitHub ↗
(buffer)

Source from the content-addressed store, hash-verified

1593 }
1594
1595 function convertoFloat32ToInt16(buffer) {
1596 var l = buffer.length;
1597 var buf = new Int16Array(l)
1598
1599 while (l--) {
1600 buf[l] = buffer[l] * 0xFFFF; //convert to 16 bit
1601 }
1602 return buf.buffer
1603 }
1604
1605 // creates the audio context
1606 var context = ObjectStore.AudioContextConstructor;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected