aboutsummaryrefslogtreecommitdiffstats
path: root/alc/mixvoice.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-20 05:26:51 -0700
committerChris Robinson <[email protected]>2019-08-20 05:26:51 -0700
commit7a8f81259c515291126f29a0e65aff791efe16b0 (patch)
tree124b56dc301dec0116dd6394d0f46389123da7b2 /alc/mixvoice.cpp
parent102ef6cb3356ef81e2a392d3aa8bd6324eb3ff30 (diff)
Use size_t for the NFC and biquad filters' sample count
Diffstat (limited to 'alc/mixvoice.cpp')
-rw-r--r--alc/mixvoice.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/mixvoice.cpp b/alc/mixvoice.cpp
index a44b6a10..189e504b 100644
--- a/alc/mixvoice.cpp
+++ b/alc/mixvoice.cpp
@@ -337,7 +337,7 @@ void SendSourceStoppedEvent(ALCcontext *context, ALuint id)
const ALfloat *DoFilters(BiquadFilter *lpfilter, BiquadFilter *hpfilter, ALfloat *dst,
- const ALfloat *src, ALsizei numsamples, int type)
+ const ALfloat *src, const size_t numsamples, int type)
{
switch(type)
{
@@ -769,11 +769,11 @@ void MixVoice(ALvoice *voice, ALvoice::State vstate, const ALuint SourceID, ALCc
const al::span<float> nfcsamples{Device->NfcSampleData,
static_cast<size_t>(DstBufferSize)};
size_t chanoffset{outcount};
- using FilterProc = void (NfcFilter::*)(float*,const float*,int);
- auto apply_nfc = [voice,&parms,samples,TargetGains,DstBufferSize,Counter,OutPos,&chanoffset,nfcsamples](const FilterProc process, const size_t outcount) -> void
+ using FilterProc = void (NfcFilter::*)(float*,const float*,const size_t);
+ auto apply_nfc = [voice,&parms,samples,TargetGains,Counter,OutPos,&chanoffset,nfcsamples](const FilterProc process, const size_t outcount) -> void
{
if(outcount < 1) return;
- (parms.NFCtrlFilter.*process)(nfcsamples.data(), samples, DstBufferSize);
+ (parms.NFCtrlFilter.*process)(nfcsamples.data(), samples, nfcsamples.size());
MixSamples(nfcsamples, voice->mDirect.Buffer.subspan(chanoffset, outcount),
parms.Gains.Current+chanoffset, TargetGains+chanoffset, Counter,
OutPos);