This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23783 - Connecting two StreamSource nodes to the same stream
Summary: Connecting two StreamSource nodes to the same stream
Status: CLOSED WONTFIX
Alias: None
Product: AudioWG
Classification: Unclassified
Component: Web Audio API (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: TBD
Assignee: This bug has no owner yet - up for the taking
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-10 11:54 UTC by lonny
Modified: 2014-10-28 17:16 UTC (History)
0 users

See Also:


Attachments

Description lonny 2013-11-10 11:54:55 UTC
Version 31.0.1650.48 beta-m, Windows 7 

Connecting two StreamSource nodes to the same stream doesn't work.

In more detail:

navigator.getUserMedia({audio:true}, gotAudio, error)
   returns the same stream each time it is called. I suppose this is correct behavior. 

But if you connect two "microphone nodes" to that single stream:

var mic1, mic2;
function gotAudio(stream) {
   mic1 = audioContext.createMediaStreamSource(stream);
   mic2 = audioContext.createMediaStreamSource(stream);
}
and then connect both mics to the audio destination, the audio output alternates between buffers of silence and buffers of sound. It is as if one of the mics "consumes" the stream data so that the second gets silence. 


You might ask "why would you want to do that?" Well, this is besides the point as far as the bug is concerned, but it came up because I had two previously-written "sub-graphs" that each grabbed the input audio stream and attached a microphone to it. Then I created a new "meta graph" that cross faded between the two. 

My "work-around" was to create a global microphone (StreamSource) node, create it only once, and use it again if it already exists.
Comment 1 Olivier Thereaux 2014-10-28 17:13:39 UTC
Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues
Comment 2 Olivier Thereaux 2014-10-28 17:16:33 UTC
Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.