aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-10-02 01:02:25 -0700
committerChris Robinson <[email protected]>2014-10-02 01:02:25 -0700
commit9377d0f23730ff0d42a870627ea9a75059c481f4 (patch)
treec70b9a92d16a9ff16965e5488ab8783629ae47c1 /OpenAL32/Include/alu.h
parent918c773a59ebae6f68c4621a393449df5e8dbf6b (diff)
Don't use ComputeAngleGains for SetGains
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 136025d1..bf5de4fe 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -224,7 +224,11 @@ void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat hwidth, A
*/
inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels])
{
- ComputeAngleGains(device, 0.0f, F_PI, ingain, gains);
+ ALuint i;
+ for(i = 0;i < MaxChannels;i++)
+ gains[i] = 0.0f;
+ for(i = 0;i < device->NumSpeakers;i++)
+ gains[device->Speaker[i].ChanName] = ingain;
}