We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4648 - incorrect channel/speakers mapping
Summary: incorrect channel/speakers mapping
Status: NEW
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-31 15:26 UTC by AltairPL
Modified: 2019-05-31 15:26 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AltairPL 2019-05-31 15:26:25 UTC
Some time ago I tried using Mix_SetPosition() to test the idea of using rudimentary audio positioning in my engine. Simply put, wrong channels were used. Tried using both mono and stereo audio files and Mix_SetPanning() with pretty much the same result. After that I decided to make a separate test to see how playback of 5.1 ogg is handled and I noticed the same thing. Same file was played correctly in various media players and other applications. Results look like this (with test app restarted between tests):

Speakers set to 2.0/2.1:
src    SDL     should be
FL     FL      FL
FC     FR      FL/FR
FR     FL/FR   FR
BL     ?       FL
BR     FL      FR
LF     LF      LF

Speakers set to 4.0/4.1:
src    SDL     should be
FL     FL      FL
FC     FR      FL/FR
FR     FL/FR   FR
BL     ?       BL
BR     BL      BR
LF     LF      LF

Speakers set to 5.1:
src    SDL    OK
FL     FL     FL
FC     FR     FC
FR     FC     FR
BL     ?      BL
BR     BL     BR
LF     LF     LF

This test was performed using:
- SDL 2.0.8 (x86)
- pre-release SDL_mixer 2.0.3 (x86) "released" on discourse 
(https://discourse.libsdl.org/t/sdl-mixer-2-0-3-prerelease/23959)
- Windows 7 64-bit
- Auzentech X-Fi Prelude 7.1 sound card
- 5.1 speaker set
- 5.1 ogg file from 
https://people.xiph.org/~xiphmont/demo/surround/demo.html - for some reason SDL_mixer refused to play 5.1 wav file

Had no chance to test it in SDL_mixer 2.0.4, but I haven't seen any mention of it in changelog, so I assume it's still the case.