[SDL] SDL_mixer bugs

David Ergo david.ergo at alterface.com
Thu Mar 3 01:08:27 PST 2005


I have found two bugs in SDL_mixer v.1.2.6 in 5.1 surround mode :

1. LFE channel saturated
------------------------
The LFE channel gets saturated, because it's erroneously multiplied by
255 in SetPosition() function. 
To correct this, edit effect_position.c, at line 1551, replace
   args->lfe_f = 255.0f;
by
   args->lfe_f = 1.0f;
Actually under Windows, it's the rear right channel that gets saturated
because of the bug number 2 here under.

2. Sound channels interverted under Windows
-------------------------------------------
Windows DirectX doesn't use the same channels order as Linux ALSA.
For Linux ALSA, this is FL-FR-RL-RR-C-LFE
and for Windows DirectX, this is FL-FR-C-LFE-RL-RR
where FL = Front Left
      FR = Front Right
      RL = Rear Left
      RR = Rear Right
      C  = Center
      LFE = Low Frequency Effects
If you don't do any SetPosition()/SetPanning() there won't be any
problems I think because the channels data is not modified, but if you
do SetPosition() or SetPanning(), it will use C/LFE instead of RL/RR and
RL/RR instead of C/LFE, so the channels data will be messed up for
RL/RR/C/LFE.
I'll try to make a patch for this.


David Ergo
Alterface s.a.





More information about the SDL mailing list