diff options
author | Chris Robinson <[email protected]> | 2014-11-07 03:43:33 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-07 03:43:33 -0800 |
commit | 3f7cb8392ea8b75754e5292f75fdfe50168ffc8e (patch) | |
tree | 16835b1c968d401684e4c73a9eeb386d5df89cfb /Alc/effects/dedicated.c | |
parent | 713e9dd4cc5f0bbe396fae35282ec147a45a0974 (diff) |
Pas the output device channel count to ALeffectState::process
Diffstat (limited to 'Alc/effects/dedicated.c')
-rw-r--r-- | Alc/effects/dedicated.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/effects/dedicated.c b/Alc/effects/dedicated.c index 2d955888..e09cc682 100644 --- a/Alc/effects/dedicated.c +++ b/Alc/effects/dedicated.c @@ -75,14 +75,14 @@ static ALvoid ALdedicatedState_update(ALdedicatedState *state, ALCdevice *device } } -static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE]) +static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALuint SamplesToDo, const ALfloat *restrict SamplesIn, ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels) { const ALfloat *gains = state->gains; ALuint i, c; - for(c = 0;c < MAX_OUTPUT_CHANNELS;c++) + for(c = 0;c < NumChannels;c++) { - if(!(gains[c] > GAIN_SILENCE_THRESHOLD)) + if(!(fabsf(gains[c]) > GAIN_SILENCE_THRESHOLD)) continue; for(i = 0;i < SamplesToDo;i++) |