aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alu.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
committerChris Robinson <[email protected]>2014-11-04 03:33:35 -0800
commit6083a684d1cad2ea97ce966b7b2ca011d1f37fe1 (patch)
tree2f419e5de632b2caadd7bed1b934f4afdd96c902 /OpenAL32/Include/alu.h
parentd8cfdb3f348b3e4dd545a5ebd7f282aa2b4ee585 (diff)
Use a method to set omni-directional channel gains
Diffstat (limited to 'OpenAL32/Include/alu.h')
-rw-r--r--OpenAL32/Include/alu.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index 6ebafe86..3b0ce871 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -218,6 +218,13 @@ void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfl
void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat elevation, ALfloat ingain, ALfloat gains[MaxChannels]);
/**
+ * ComputeAmbientGains
+ *
+ * Sets channel gains for ambient, omni-directional sounds.
+ */
+void ComputeAmbientGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels]);
+
+/**
* ComputeBFormatGains
*
* Sets channel gains for a given (first-order) B-Format channel. The matrix is
@@ -226,20 +233,6 @@ void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat elevation
*/
void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MaxChannels]);
-/**
- * SetGains
- *
- * Helper to set the appropriate channels to the specified gain.
- */
-inline void SetGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels])
-{
- 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;
-}
-
ALvoid CalcSourceParams(struct ALvoice *voice, const struct ALsource *source, const ALCcontext *ALContext);
ALvoid CalcNonAttnSourceParams(struct ALvoice *voice, const struct ALsource *source, const ALCcontext *ALContext);