Bug 192932

Summary: Can not disable audio processing (lowpass)
Product: WebKit Reporter: Franz Bender <franz.bender>
Component: Web AudioAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Normal CC: eric.carlson, jer.noble, rclough, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 12   
Hardware: All   
OS: All   
Attachments:
Description Flags
Page 1: Chrome picks up high frequency audio; Page 2: Safari doesn't pick up high frequencies none

Description Franz Bender 2018-12-20 08:44:59 PST
Created attachment 357815 [details]
Page 1: Chrome picks up high frequency audio; Page 2: Safari doesn't pick up high frequencies

Problem:
There is no way to disable the pre-preprocessing of audio (coming from the microphone). Even with the 'echoCancellation'-Flag set to false high frequencies get filtered out.

What did I try to do:
I'm trying to analyze audio coming from the microphone:

let stream = await navigator.mediaDevices.getUserMedia({
    audio: {
        optional: [
            {autoGainControl: false},
            {noiseSuppression: false},
            {echoCancellation: false}
        ]
    },
    video: false
});
let inputSource = this.audioCtx.createMediaStreamSource(stream);

I wrote a script implementing an algorithm which detects certain frequencies (called Goertzel algorithm). I noticed that it only works for low frequencies (in the range of human hearing). In Chrome however it did work so I assume that there is still some kind of audio processing going even though I tried to disable it.

In the attached PDF-File you can see two screenshots of exactly the same page. The left box is a plot of the raw audio data (512 Samples) and on the right is an indicator that shows the level of 18000Hz. I set my iPad up to play a 18000Hz signal at high volume. Chrome (page 1) processes the audio correctly. Safari on the other hand doesn't pick up those high frequencies.
Comment 1 Franz Bender 2018-12-20 08:47:07 PST
I forgot: This behavior can be observed using desktop Safari (Version 12.0 (14606.1.36.1.9)) as well as mobile Safari (iOS 12.1 (16B92))
Comment 2 Radar WebKit Bug Importer 2018-12-20 16:09:23 PST
<rdar://problem/46886789>
Comment 3 Ryan Clough 2019-10-24 09:26:10 PDT
Can confirm, see my comment in https://bugs.webkit.org/show_bug.cgi?id=179411
Comment 4 youenn fablet 2023-07-17 00:48:58 PDT
We are no longer using VPIO if echoCancellation is false.
I would believe this should make it work fine.
Please reopen otherwise.