diff options
author | Chris Robinson <[email protected]> | 2014-11-07 02:18:24 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-07 02:18:24 -0800 |
commit | 4c3f27193f7379513b3e45398711cfe1238184fd (patch) | |
tree | 93499e0af78b28be8568bd4ac689d3a40728b96f /Alc/panning.c | |
parent | 6c954e71dbd99a2ceb072c08481aee92ef8461c0 (diff) |
Use a separate macro for the max output channel count
Diffstat (limited to 'Alc/panning.c')
-rw-r--r-- | Alc/panning.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Alc/panning.c b/Alc/panning.c index 051eac10..99739d58 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -32,7 +32,7 @@ #include "alu.h" -void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat elevation, ALfloat ingain, ALfloat gains[MaxChannels]) +void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat elevation, ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]) { ALfloat dir[3] = { sinf(angle) * cosf(elevation), @@ -42,7 +42,7 @@ void ComputeAngleGains(const ALCdevice *device, ALfloat angle, ALfloat elevation ComputeDirectionalGains(device, dir, ingain, gains); } -void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfloat ingain, ALfloat gains[MaxChannels]) +void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]) { ALfloat coeffs[MAX_AMBI_COEFFS]; ALuint i, j; @@ -68,7 +68,7 @@ void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfl coeffs[14] = x * (x*x - 3.0f*y*y); /* X * (X*X - 3*Y*Y) */ coeffs[15] = y * (3.0f*x*x - y*y); /* Y * (3*X*X - Y*Y) */ - for(i = 0;i < MaxChannels;i++) + for(i = 0;i < MAX_OUTPUT_CHANNELS;i++) gains[i] = 0.0f; for(i = 0;i < device->NumSpeakers;i++) { @@ -78,21 +78,21 @@ void ComputeDirectionalGains(const ALCdevice *device, const ALfloat dir[3], ALfl } } -void ComputeAmbientGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MaxChannels]) +void ComputeAmbientGains(const ALCdevice *device, ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]) { ALuint i; - for(i = 0;i < MaxChannels;i++) + for(i = 0;i < MAX_OUTPUT_CHANNELS;i++) gains[i] = 0.0f; for(i = 0;i < device->NumSpeakers;i++) gains[i] = device->Speaker[i].HOACoeff[0] * ingain; } -void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MaxChannels]) +void ComputeBFormatGains(const ALCdevice *device, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]) { ALuint i, j; - for(i = 0;i < MaxChannels;i++) + for(i = 0;i < MAX_OUTPUT_CHANNELS;i++) gains[i] = 0.0f; for(i = 0;i < device->NumSpeakers;i++) { @@ -196,7 +196,7 @@ ALvoid aluInitPanning(ALCdevice *device) chanmap = X71Cfg; break; } - for(i = 0;i < MaxChannels && device->ChannelName[i] != InvalidChannel;i++) + for(i = 0;i < MAX_OUTPUT_CHANNELS && device->ChannelName[i] != InvalidChannel;i++) { for(j = 0;j < count;j++) { |