Handle endian conversions from the Timidity process
commitaa993d63bc516e587efe7e84c2f521277b451863
authorChris Robinson <chris.kcat@gmail.com>
Fri, 19 Feb 2010 12:29:05 +0000 (19 04:29 -0800)
committerChris Robinson <chris.kcat@gmail.com>
Fri, 19 Feb 2010 12:29:05 +0000 (19 04:29 -0800)
tree01a0f392e7577b6d8bcdeff53175ccbf81dc57a3
parent7de821a6718c4814d9ae2bcfd723c59eb76b9967
Handle endian conversions from the Timidity process
There's no guarantee that Timidity will write raw samples with the same byte
order as the receiving process, such as if one is run under a CPU emulator and
the other is not. Worse, it only has an option to swap bytes instead of forcing
a specific order.

To get around this, make Timidity output a RIFF WAVE byte sequence, which will
guarantee little-endian ordering. If both Timidity and the receiving process
are big endian, this can cause a conversion on both ends.
src/stream.cpp