<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>23783</bug_id>
          
          <creation_ts>2013-11-10 11:54:55 +0000</creation_ts>
          <short_desc>Connecting two StreamSource nodes to the same stream</short_desc>
          <delta_ts>2014-10-28 17:16:33 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>AudioWG</product>
          <component>Web Audio API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>TBD</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>lonny</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>96090</commentid>
    <comment_count>0</comment_count>
    <who name="">lonny</who>
    <bug_when>2013-11-10 11:54:55 +0000</bug_when>
    <thetext>Version 31.0.1650.48 beta-m, Windows 7 

Connecting two StreamSource nodes to the same stream doesn&apos;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 &quot;microphone nodes&quot; 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 &quot;consumes&quot; the stream data so that the second gets silence. 


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

My &quot;work-around&quot; was to create a global microphone (StreamSource) node, create it only once, and use it again if it already exists.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113856</commentid>
    <comment_count>1</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2014-10-28 17:13:39 +0000</bug_when>
    <thetext>Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113999</commentid>
    <comment_count>2</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2014-10-28 17:16:33 +0000</bug_when>
    <thetext>Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>