ipython/ipython — pull request #5783 by eteq (2014-05-04 19:56:46+00:00)
Title: Change display.Audio to support stereo/n-channel

In the current master, it's only possible to create mono `display.Audio` objects from numpy arrays. This PR enhances Audio to allow multiple channels of audio. It thereby allows usage like:
```
samplespersec= 44100
t = np.linspace(0,5,samplespersec*5)
dataleft = np.sin(2*np.pi*110*t)
dataright = np.sin(2*np.pi*220*t)
Audio([dataleft, dataright],rate=samplespersec)
```
(which gives different pitches in the left and right channels.)

I tested this both on Firefox in Ubuntu and Chrome on Windows 8, and it performs as expected for stereo audio.

For >2 channels, I can't test quite as well because I don't have 5.1 speakers connected, but it does seem to do the correct "simulated" version on headphones by going left,right,center, LF, fainter left, fainter right...