Bug 173826 - Heavily distorted audio when calling createMediaStreamSource multiple times
Summary: Heavily distorted audio when calling createMediaStreamSource multiple times
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: 2017-06-25 18:50 PDT by Andrew Morris
Modified: 2017-06-26 08:54 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Morris 2017-06-25 18:50:30 PDT
JSBin demo:
https://output.jsbin.com/noyepif

Summary:
  // Analyse the audio
  const streamSrc1 = audioCtx.createMediaStreamSource(stream);
  const analyser = audioCtx.createAnalyser();
  streamSrc1.connect(analyser);
  
  // Play the audio
  const streamSrc2 = audioCtx.createMediaStreamSource(stream);
  streamSrc2.connect(audioCtx.destination);

One solution is to use the same MediaStreamSource instead of creating multiple, but it doesn't seem like this should be necessary. Chrome and Firefox handle this without issue. This can occur for example when these operations are done in separate parts of the application.
Comment 1 Radar WebKit Bug Importer 2017-06-26 08:54:09 PDT
<rdar://problem/32981074>