diff options
author | Chris Robinson <[email protected]> | 2016-03-25 14:40:44 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-03-25 14:40:44 -0700 |
commit | 31489861847dcb15a2f21ffb70d98f9da6051c8f (patch) | |
tree | 4888cee30f9c7d107ce326e4dd9e8bdc912a8baa /Alc/ALu.c | |
parent | 19b130c45d0760f44b453cec6be33ae5cef48851 (diff) |
Implement AL_EXT_STEREO_ANGLES support
Diffstat (limited to 'Alc/ALu.c')
-rw-r--r-- | Alc/ALu.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -303,9 +303,6 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A { static const struct ChanMap MonoMap[1] = { { FrontCenter, 0.0f, 0.0f } - }, StereoMap[2] = { - { FrontLeft, DEG2RAD(-30.0f), DEG2RAD(0.0f) }, - { FrontRight, DEG2RAD( 30.0f), DEG2RAD(0.0f) } }, RearMap[2] = { { BackLeft, DEG2RAD(-150.0f), DEG2RAD(0.0f) }, { BackRight, DEG2RAD( 150.0f), DEG2RAD(0.0f) } @@ -352,6 +349,10 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A ALuint NumSends, Frequency; ALboolean Relative; const struct ChanMap *chans = NULL; + struct ChanMap StereoMap[2] = { + { FrontLeft, DEG2RAD(-30.0f), DEG2RAD(0.0f) }, + { FrontRight, DEG2RAD( 30.0f), DEG2RAD(0.0f) } + }; ALuint num_channels = 0; ALboolean DirectChannels; ALboolean isbformat = AL_FALSE; @@ -373,6 +374,10 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A Relative = ALSource->HeadRelative; DirectChannels = ALSource->DirectChannels; + /* Convert counter-clockwise to clockwise. */ + StereoMap[0].angle = -ALSource->StereoPan[0]; + StereoMap[1].angle = -ALSource->StereoPan[1]; + voice->Direct.OutBuffer = Device->Dry.Buffer; voice->Direct.OutChannels = Device->Dry.NumChannels; for(i = 0;i < NumSends;i++) |