Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I suggest trying Ben Voigt's answer first, since if that works out it will probably be easier and more flexible.</p> <p>But if for some reason it doesn't, another alternative is as follows.</p> <p>Basically, when you want to play the mono .wav out of a particular speaker, convert it to a 6-channel .wav that's silent on five of the channels, but contains the data from the mono .wav on the channel for the speaker you want it to play on.</p> <p>This should be fairly easy to do, because the .wav file format is very simple. The basic idea is that the sound data in your mono .wav file will consist of (typically) two-byte pairs for each audio sample, for example:</p> <pre><code>1234 2ab3 def0 ce18 .... </code></pre> <p>To convert that data to multi-channel you need to insert silence (zero) for the other channels. For example, for channel 0 (front-left) you'd use:</p> <pre><code>1234 0000 0000 0000 0000 0000 2ab3 0000 0000 0000 0000 0000 def0 0000 0000 0000 0000 0000 (etc) </code></pre> <p>whereas for front-right you'd use:</p> <pre><code>0000 1234 0000 0000 0000 0000 0000 2ab3 0000 0000 0000 0000 0000 def0 0000 0000 0000 0000 (etc) </code></pre> <p>(Consult this <a href="http://en.wikipedia.org/wiki/Surround_sound#Standard_speaker_channels" rel="nofollow">list of speaker assignments</a> for the order.)</p> <p>You also need to deal with the file's header, but the <a href="https://ccrma.stanford.edu/courses/422/projects/WaveFormat/" rel="nofollow">wave file header format</a> is very simple; you'd need to change <code>NumChannels</code> from 1 to 6, <code>ByteRate</code> from whatever it is to the same value times 6, similarly for <code>BlockAlign</code> and <code>Subchunk2Size</code>.</p> <p>NB I haven't actually tested any of the above, but it shouldn't take too much time to experiment. If it doesn't work, it may be necessary to add the newer WAVE_FORMAT_EXTENSIBLE data to the file - more fiddly but still not too hard; here is a <a href="http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html" rel="nofollow">useful page describing these extensions to the .wav format</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload