diff options
author | Chris Robinson <[email protected]> | 2014-11-07 00:54:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-07 00:54:16 -0800 |
commit | 0051a9637644795c721945faf64f9917ec5aa788 (patch) | |
tree | d5eb47396290ee0f51513e9c01574ffc7cd5cd88 /Alc/backends/opensl.c | |
parent | 7a98e92117200ef1071dbf4ef2982141fe84e788 (diff) |
Fix 5.1 surround sound
Apparently, 5.1 surround sound is supposed to use the "side" channels, not the
back channels, and we've been wrong this whole time. That means the "5.1 Side"
is actually the correct 5.1 setup, and using the back channels is anomalous.
Additionally, this means the 5.1 buffer format should also use the the side
channels instead of the back channels.
A final note: the 5.1 mixing coefficients are changed so both use the original
5.1 surround sound set (with the surround channels at +/-110 degrees). So the
only difference now between 5.1 "side" and 5.1 "back" is the channel labels.
Diffstat (limited to 'Alc/backends/opensl.c')
-rw-r--r-- | Alc/backends/opensl.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/backends/opensl.c b/Alc/backends/opensl.c index 2547f4b4..6a022753 100644 --- a/Alc/backends/opensl.c +++ b/Alc/backends/opensl.c @@ -67,7 +67,10 @@ static SLuint32 GetChannelMask(enum DevFmtChannels chans) SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT; case DevFmtX51: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT| SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY| - SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT; + SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT; + case DevFmtX51Rear: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT| + SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY| + SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT; case DevFmtX61: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT| SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY| SL_SPEAKER_BACK_CENTER| @@ -76,9 +79,6 @@ static SLuint32 GetChannelMask(enum DevFmtChannels chans) SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY| SL_SPEAKER_BACK_LEFT|SL_SPEAKER_BACK_RIGHT| SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT; - case DevFmtX51Side: return SL_SPEAKER_FRONT_LEFT|SL_SPEAKER_FRONT_RIGHT| - SL_SPEAKER_FRONT_CENTER|SL_SPEAKER_LOW_FREQUENCY| - SL_SPEAKER_SIDE_LEFT|SL_SPEAKER_SIDE_RIGHT; } return 0; } |