aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-04-09 12:27:30 -0700
committerChris Robinson <[email protected]>2010-04-09 12:27:30 -0700
commit484702a2e5e9cc0368a4562bc7574764a2178da8 (patch)
tree8293cdb8fc202d5e82e81c4ee19dde678408d388
parent371058fb9e9da11133cf31d40f1a1da52dc8da51 (diff)
Get the speaker arrangement before setting up the channel matrix
-rw-r--r--Alc/ALu.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 40b5662d..3eda6edb 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -235,6 +235,25 @@ ALvoid aluInitPanning(ALCdevice *Device)
ALfloat maxout;
ALuint s, s2;
+ Device->NumChan = 8;
+ Speaker2Chan[0] = BACK_LEFT;
+ Speaker2Chan[1] = SIDE_LEFT;
+ Speaker2Chan[2] = FRONT_LEFT;
+ Speaker2Chan[3] = FRONT_CENTER;
+ Speaker2Chan[4] = FRONT_RIGHT;
+ Speaker2Chan[5] = SIDE_RIGHT;
+ Speaker2Chan[6] = BACK_RIGHT;
+ Speaker2Chan[7] = BACK_CENTER;
+ SpeakerAngle[0] = -150.0f * M_PI/180.0f;
+ SpeakerAngle[1] = -90.0f * M_PI/180.0f;
+ SpeakerAngle[2] = -30.0f * M_PI/180.0f;
+ SpeakerAngle[3] = 0.0f * M_PI/180.0f;
+ SpeakerAngle[4] = 30.0f * M_PI/180.0f;
+ SpeakerAngle[5] = 90.0f * M_PI/180.0f;
+ SpeakerAngle[6] = 150.0f * M_PI/180.0f;
+ SpeakerAngle[7] = 180.0f * M_PI/180.0f;
+ SetSpeakerArrangement("layout", SpeakerAngle, Speaker2Chan, Device->NumChan);
+
for(s = 0;s < OUTPUTCHANNELS;s++)
{
for(s2 = 0;s2 < OUTPUTCHANNELS;s2++)
@@ -328,24 +347,6 @@ ALvoid aluInitPanning(ALCdevice *Device)
Device->ChannelMatrix[s2][s] *= maxout;
}
- Device->NumChan = 8;
- Speaker2Chan[0] = BACK_LEFT;
- Speaker2Chan[1] = SIDE_LEFT;
- Speaker2Chan[2] = FRONT_LEFT;
- Speaker2Chan[3] = FRONT_CENTER;
- Speaker2Chan[4] = FRONT_RIGHT;
- Speaker2Chan[5] = SIDE_RIGHT;
- Speaker2Chan[6] = BACK_RIGHT;
- Speaker2Chan[7] = BACK_CENTER;
- SpeakerAngle[0] = -150.0f * M_PI/180.0f;
- SpeakerAngle[1] = -90.0f * M_PI/180.0f;
- SpeakerAngle[2] = -30.0f * M_PI/180.0f;
- SpeakerAngle[3] = 0.0f * M_PI/180.0f;
- SpeakerAngle[4] = 30.0f * M_PI/180.0f;
- SpeakerAngle[5] = 90.0f * M_PI/180.0f;
- SpeakerAngle[6] = 150.0f * M_PI/180.0f;
- SpeakerAngle[7] = 180.0f * M_PI/180.0f;
- SetSpeakerArrangement("layout", SpeakerAngle, Speaker2Chan, Device->NumChan);
for(pos = 0; pos < LUT_NUM; pos++)
{