diff options
author | Chris Robinson <[email protected]> | 2018-12-05 15:20:52 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-05 15:20:52 -0800 |
commit | 10b39d57d53b541bd4e8fd60d166a03de0c9e28c (patch) | |
tree | 70b764d3a5542312f04e9e9f964bc1525e1105b2 /Alc/mixvoice.cpp | |
parent | 164a86a381e4f51383c6afbfdf63dadd3ecb3785 (diff) |
Use class methods for the NFC filters
Diffstat (limited to 'Alc/mixvoice.cpp')
-rw-r--r-- | Alc/mixvoice.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 |