From 10b39d57d53b541bd4e8fd60d166a03de0c9e28c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 5 Dec 2018 15:20:52 -0800 Subject: Use class methods for the NFC filters --- Alc/mixvoice.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Alc/mixvoice.cpp') diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp index 91c48daf..f60043d7 100644 --- a/Alc/mixvoice.cpp +++ b/Alc/mixvoice.cpp @@ -531,21 +531,21 @@ ALboolean MixSource(ALvoice *voice, ALuint SourceID, ALCcontext *Context, ALsize ALfloat *nfcsamples{Device->TempBuffer[NFC_DATA_BUF]}; ALsizei chanoffset{voice->Direct.ChannelsPerOrder[0]}; - using FilterProc = void(NfcFilter*,ALfloat*,const ALfloat*,ALsizei); - auto apply_nfc = [voice,parms,samples,DstBufferSize,Counter,OutPos,&chanoffset,nfcsamples](FilterProc &process, ALsizei order) -> void + using FilterProc = void (NfcFilter::*)(float*,const float*,int); + auto apply_nfc = [voice,parms,samples,DstBufferSize,Counter,OutPos,&chanoffset,nfcsamples](FilterProc process, ALsizei order) -> void { if(voice->Direct.ChannelsPerOrder[order] < 1) return; - process(&parms->NFCtrlFilter, nfcsamples, samples, DstBufferSize); + (parms->NFCtrlFilter.*process)(nfcsamples, samples, DstBufferSize); MixSamples(nfcsamples, voice->Direct.ChannelsPerOrder[order], voice->Direct.Buffer+chanoffset, parms->Gains.Current+chanoffset, parms->Gains.Target+chanoffset, Counter, OutPos, DstBufferSize ); chanoffset += voice->Direct.ChannelsPerOrder[order]; }; - apply_nfc(NfcFilterProcess1, 1); - apply_nfc(NfcFilterProcess2, 2); - apply_nfc(NfcFilterProcess3, 3); + apply_nfc(&NfcFilter::process1, 1); + apply_nfc(&NfcFilter::process2, 2); + apply_nfc(&NfcFilter::process3, 3); } } else -- cgit v1.2.3