diff options
author | Chris Robinson <[email protected]> | 2016-07-11 23:30:32 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-07-11 23:30:32 -0700 |
commit | 14166264d6fc59386d9cbbfcd12c78ffab5989fb (patch) | |
tree | d7ce96315f5ee61d921a8ef44ba572adf59e0cff /Alc/mixer.c | |
parent | e4039cb9ae488badd5575d7179b80130d5c5c740 (diff) |
Store the voice output buffers separate from the params
Diffstat (limited to 'Alc/mixer.c')
-rw-r--r-- | Alc/mixer.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Alc/mixer.c b/Alc/mixer.c index 094d3768..748a2357 100644 --- a/Alc/mixer.c +++ b/Alc/mixer.c @@ -569,7 +569,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam if(!Counter) { - for(j = 0;j < parms->OutChannels;j++) + for(j = 0;j < voice->DirectOut.Channels;j++) { gains[j].Target = targets[j]; gains[j].Current = gains[j].Target; @@ -578,7 +578,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam } else { - for(j = 0;j < parms->OutChannels;j++) + for(j = 0;j < voice->DirectOut.Channels;j++) { ALfloat diff; gains[j].Target = targets[j]; @@ -594,10 +594,10 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam } } - MixSamples(samples, parms->OutChannels, parms->OutBuffer, gains, - Counter, OutPos, DstBufferSize); + MixSamples(samples, voice->DirectOut.Channels, voice->DirectOut.Buffer, + gains, Counter, OutPos, DstBufferSize); - for(j = 0;j < parms->OutChannels;j++) + for(j = 0;j < voice->DirectOut.Channels;j++) currents[j] = gains[j].Current; } else @@ -639,9 +639,9 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam ridx = GetChannelIdxByName(Device->RealOut, FrontRight); assert(lidx != -1 && ridx != -1); - MixHrtfSamples(parms->OutBuffer, lidx, ridx, samples, Counter, voice->Offset, - OutPos, IrSize, &hrtfparams, &parms->Hrtf[chan].State, - DstBufferSize); + MixHrtfSamples(voice->DirectOut.Buffer, lidx, ridx, samples, Counter, + voice->Offset, OutPos, IrSize, &hrtfparams, + &parms->Hrtf[chan].State, DstBufferSize); } } @@ -653,7 +653,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam MixGains gains[MAX_OUTPUT_CHANNELS]; const ALfloat *samples; - if(!parms->OutBuffer) + if(!voice->SendOut[j].Buffer) continue; samples = DoFilters( @@ -664,7 +664,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam if(!Counter) { - for(j = 0;j < parms->OutChannels;j++) + for(j = 0;j < voice->SendOut[j].Channels;j++) { gains[j].Target = targets[j]; gains[j].Current = gains[j].Target; @@ -673,7 +673,7 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam } else { - for(j = 0;j < parms->OutChannels;j++) + for(j = 0;j < voice->SendOut[j].Channels;j++) { ALfloat diff; gains[j].Target = targets[j]; @@ -689,10 +689,10 @@ ALvoid MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALuint Sam } } - MixSamples(samples, parms->OutChannels, parms->OutBuffer, gains, - Counter, OutPos, DstBufferSize); + MixSamples(samples, voice->SendOut[j].Channels, voice->SendOut[j].Buffer, + gains, Counter, OutPos, DstBufferSize); - for(j = 0;j < parms->OutChannels;j++) + for(j = 0;j < voice->SendOut[j].Channels;j++) currents[j] = gains[j].Current; } } |