title: Appending data to an already existing AudioBuffer object
body: <p>I'm looking to append data to an <em>already</em> existing <a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createBuffer" rel="noreferrer">AudioBuffer</a> that is being played using web audio.</p>
  
  <hr>
  
  <p>Upon receiving audio data to play, I create an <a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createBufferSource" rel="noreferrer">AudioBuffer</a> and then assign the data to the ArrayBuffer response.</p>
  
  <pre><code>    var audioBuffer = context.createBuffer(1, audioToPlay.length, 16000);
      audioBuffer.getChannelData(0).set(audioToPlay);
  </code></pre>
  
  <p>I then create a <a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioContext.createBufferSource" rel="noreferrer">buffer source node</a> and hook up the audio buffer to the web audio context.</p>
  
  <pre><code>    var source = context.createBufferSource();
      source.buffer = audioBuffer;
      source.connect(context.destination);
      source.start(0);
  </code></pre>
  
  <p>Now, what I would like to do is append more data (another ArrayBuffer) to the <em>currently playing</em> buffer, while <strong>avoiding</strong> having to use the <code>onended</code> callback to create a new buffer..</p>
  
  <p>Is there any way to do this? From what I can tell, this does not appear to be supported.</p>