[Webkit-unassigned] [Bug 215314] New: Distorted audio when using createMediaElementSource

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Aug 9 05:28:42 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=215314

            Bug ID: 215314
           Summary: Distorted audio when using createMediaElementSource
           Product: WebKit
           Version: Safari 13
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Audio
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: Steve.Hummingbird at yandex.com

This bug report is a follow up to https://bugs.webkit.org/show_bug.cgi?id=211394 and radar id 48560346 (submitted march 2019 - no response yet) 

Summary:
When an audio element is connected to a web audio graph, this leads to audible noise (crackles) on iOS devices (independent of the browser being used - tested on safari and chrome). The issue does not show up on android devices or on macOS.

Steps to Reproduce:
visit https://jsfiddle.net/st___h/36w7vxn2/15/show and press "click to start". audio should play. In case audio plays without noise, reload page and try again. Issue usually shows up within less then 10 tries.

Expected Results:
Audio plays without issues.

Actual Results:
Audio sometimes plays with crackles/stutter. Issue shows up both in safari and chrome browser. Issue is independent of the sampleRate reported by the audioContext.
A recording from the iPads headphone output, illustrating the type of noise can be found here: https://st-h.github.io/test/ios_playback_noise.mp3

Version/Build:
tested with:
iPhone 6s iOS 12.1.4 up to 13.6
iPad Pro 2017 iOS 12.1.4 up to 13.6
using safari and chrome browser.

Configuration:
source code of test page:
https://jsfiddle.net/st___h/36w7vxn2/15

relevant code snippet:

    var context = new(window.AudioContext || window.webkitAudioContext)();
    var gainNode = context.createGain();

    var audio = new Audio();
    audio.loop = true;
    audio.crossOrigin = "anonymous";

    audio.addEventListener('error', function(e) {
      alert(e.toString());
    });
    var source = context.createMediaElementSource(audio);
    source.connect(gainNode);
    gainNode.connect(context.destination);

    audio.src = "https://st-h.github.io/test/latencies.mp3";
    audio.play();
    gainNode.gain.setValueAtTime(0.9, gainNode.context.currentTime);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200809/50ddf0e4/attachment.htm>


More information about the webkit-unassigned mailing list