diff options
Diffstat (limited to 'alc/mixvoice.cpp')
-rw-r--r-- | alc/mixvoice.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/alc/mixvoice.cpp b/alc/mixvoice.cpp index 9d7dead4..c3598612 100644 --- a/alc/mixvoice.cpp +++ b/alc/mixvoice.cpp @@ -496,9 +496,7 @@ void ALvoice::mix(State vstate, ALCcontext *Context, const ALuint SamplesToDo) ALCdevice *Device{Context->mDevice.get()}; const ALuint NumSends{Device->NumAuxSends}; - const ALsizei IrSize{Device->mHrtf ? Device->mHrtf->irSize : 0}; - - ASSUME(IrSize >= 0); + const ALuint IrSize{Device->mHrtf ? Device->mHrtf->irSize : 0}; ResamplerFunc Resample{(increment == FRACTIONONE && DataPosFrac == 0) ? Resample_<CopyTag,CTag> : mResampler}; @@ -700,8 +698,8 @@ void ALvoice::mix(State vstate, ALCcontext *Context, const ALuint SamplesToDo) hrtfparams.GainStep = gain / static_cast<ALfloat>(fademix); MixHrtfBlendSamples(mDirect.Buffer[OutLIdx], mDirect.Buffer[OutRIdx], - HrtfSamples, AccumSamples, OutPos, IrSize, &parms.Hrtf.Old, - &hrtfparams, fademix); + HrtfSamples, AccumSamples, OutPos, static_cast<ALsizei>(IrSize), + &parms.Hrtf.Old, &hrtfparams, fademix); /* Update the old parameters with the result. */ parms.Hrtf.Old = parms.Hrtf.Target; if(fademix < Counter) @@ -733,8 +731,8 @@ void ALvoice::mix(State vstate, ALCcontext *Context, const ALuint SamplesToDo) hrtfparams.GainStep = (gain - parms.Hrtf.Old.Gain) / static_cast<ALfloat>(todo); MixHrtfSamples(mDirect.Buffer[OutLIdx], mDirect.Buffer[OutRIdx], - HrtfSamples+fademix, AccumSamples+fademix, OutPos+fademix, IrSize, - &hrtfparams, todo); + HrtfSamples+fademix, AccumSamples+fademix, OutPos+fademix, + static_cast<ALsizei>(IrSize), &hrtfparams, todo); /* Store the interpolated gain or the final target gain * depending if the fade is done. */ |