Bug 181557 - getUserMedia => ScriptProcessorNode yields inputBuffer of all zeros
Summary: getUserMedia => ScriptProcessorNode yields inputBuffer of all zeros
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-11 13:43 PST by Boris Smus
Modified: 2022-02-09 10:14 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boris Smus 2018-01-11 13:43:25 PST
I was trying to get raw audio input signal from the microphone on my computer. I found that connecting getUserMedia to a ScriptProcessorNode works, but that the input buffers that are read by the onprocess callback of the ScriptProcessorNode are all zeros.

Here's how you can test it:

1. Open https://webrtc.github.io/samples/src/content/getusermedia/volume/ in WebKit (I tried in Safari Version 11.0.2 (13604.4.7.1.3) and Safari Technology Preview)
2. Observe the instant, slow and clip volume meters.

Actual: they are all zero.
Expected: they should fluctuate in response to the ambient sound captured by your device's mic.

Same URL works in Chrome.
Comment 1 Eric Carlson 2018-01-12 10:58:27 PST
<rdar://problem/33960944>
Comment 2 Maxim Solodovnik 2020-11-15 04:00:35 PST
This WebRTC example doesn't work for me in Safari 14.0
It seems like no data is received from microphone

can it be fixed?
Comment 3 Maxim Solodovnik 2020-11-15 04:44:29 PST
Works as expected in "Safari Tech Preview" :))