id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,game 2203,ALL: Endianness sound problem,SF/trilkk,fingolfin,"{{{#!Markdown When playing the games on PowerPC G4 running Linux, all sound is garbled. I examined the source code and found out the problem being no endianness checks in the mixer code. Now, the strange thing is that before 0.7.1 sound worked just fine. The glitches began when upgrading to the current version. Either the sound code is completely changed, or the endianness check has been removed \(why in the name of god?\). I was able to fix the problem for me by modifying the SoundMixer::mix method and adding implicit byte swaps at the end of the code \(after each channel has been mixed\). // This way for\(int i = 0; i < len; i++\) \{ int8 \*dst = \(int8\*\)\(&buf\[i \* 2\]\); int16 l = buf\[i \* 2\], r = buf\[i \* 2 + 1\]; dst\[0\] = l & 0xFF; dst\[1\] = l >> 8; dst\[2\] = r & 0xFF; dst\[3\] = r >> 8; \} Now, as we can see this piece of code is bullshit. Although it makes sound play ok, I don't know about your methods about checking the endianness nor I do know in which point would you like the check to be done. Please fix this in an elegant manner or provide me some information on how it should be done. }}} {{{#!div style=""font-size: 75%"" Ticket imported from: !#1294413. Ticket imported from: bugs/2203. }}}",defect,closed,normal,Ports,,worksforme,,,