title: Multi-Channel Audio HTML5 with mouseover
body: <p>I'm using the brilliant info on stories in flight to generate sound on mouseover events, its part of a project on digital writing. The draft I have currently keeps stopping sound, or in Chrome showing the 'Aw, Snap' page. The page is available at <a href="http://www.nathan-walker.co.uk/sounding" rel="nofollow">http://www.nathan-walker.co.uk/sounding</a> </p>
  
  <p>I've also upped the channels to 300 (which is potentially what i need). The other problem   is I guess because i'm using WAV files and they're rather large! If someone could suggest alternatives or know some kind of workaround that would be great!</p>
  
  <pre><code>&lt;audio id="multiaudio1" src="audio/flute_c_long_01.wav" preload="auto"&gt;&lt;/audio&gt;    
  &lt;audio id="multiaudio2" src="audio/piano_chord.wav" preload="auto"&gt;&lt;/audio&gt;
  &lt;audio id="multiaudio3" src="audio/synth_vox.wav" preload="auto"&gt;&lt;/audio&gt;    
  &lt;audio id="multiaudio4" src="audio/shimmer.wav" preload="auto"&gt;&lt;/audio&gt;
  &lt;audio id="multiaudio5" src="audio/sweep.wav" preload="auto"&gt;&lt;/audio&gt;
  
  &lt;a href="javascript:play_multi_sound('multiaudio1');"&gt;Flute&lt;/a&gt;&lt;br /&gt;
  &lt;a href="javascript:play_multi_sound('multiaudio2');"&gt;Piano Chord&lt;/a&gt;&lt;br /&gt;
  &lt;a href="javascript:play_multi_sound('multiaudio3');"&gt;Synth Vox&lt;/a&gt;&lt;br /&gt;
  &lt;a href="javascript:play_multi_sound('multiaudio4');"&gt;Shimmer&lt;/a&gt;&lt;br /&gt;
  &lt;a href="javascript:play_multi_sound('multiaudio5');"&gt;Sweep&lt;/a&gt;&lt;br /&gt;
  
  &lt;script type="text/javascript"&gt;
  var channel_max = 10;                                       // number of channels
  audiochannels = new Array();
  for (a=0;a&lt;channel_max;a++) {                                   // prepare the channels
      audiochannels[a] = new Array();
      audiochannels[a]['channel'] = new Audio();                      // create a new audio object
      audiochannels[a]['finished'] = -1;                          // expected end time for this channel
  }
  function play_multi_sound(s) {
      for (a=0;a&lt;audiochannels.length;a++) {
          thistime = new Date();
          if (audiochannels[a]['finished'] &lt; thistime.getTime()) {            // is this channel finished?
              audiochannels[a]['finished'] = thistime.getTime() + document.getElementById(s).duration*1000;
              audiochannels[a]['channel'].src = document.getElementById(s).src;
              audiochannels[a]['channel'].load();
              audiochannels[a]['channel'].play();
              break;
          }
      }
  }
  </code></pre>
  
  <p></p>