diff options
author | Chris Robinson <[email protected]> | 2018-12-29 12:26:45 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-29 12:26:45 -0800 |
commit | 8a84e7b662959015ee1e7d066351e5b7cc4fe283 (patch) | |
tree | 61d58fc4dc8d638ee45dff138754d1ccef84bd53 /Alc/backends/wasapi.cpp | |
parent | 9b0b722d7209d3cb8a31ba0823ef252906e2eb5d (diff) |
Use member functions for the sample and channel converters
Diffstat (limited to 'Alc/backends/wasapi.cpp')
-rw-r--r-- | Alc/backends/wasapi.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp index d6b50985..cb0b665b 100644 --- a/Alc/backends/wasapi.cpp +++ b/Alc/backends/wasapi.cpp @@ -1223,7 +1223,7 @@ FORCE_ALIGN int WasapiCapture::recordProc() if(mChannelConv) { samples.resize(numsamples*2); - ChannelConverterInput(mChannelConv.get(), rdata, samples.data(), numsamples); + mChannelConv->convert(rdata, samples.data(), numsamples); rdata = reinterpret_cast<BYTE*>(samples.data()); } @@ -1235,16 +1235,16 @@ FORCE_ALIGN int WasapiCapture::recordProc() const ALvoid *srcdata{rdata}; auto srcframes = static_cast<ALsizei>(numsamples); - dstframes = SampleConverterInput(mSampleConv.get(), &srcdata, &srcframes, - data.first.buf, (ALsizei)minz(data.first.len, INT_MAX)); + dstframes = mSampleConv->convert(&srcdata, &srcframes, data.first.buf, + static_cast<ALsizei>(minz(data.first.len, INT_MAX))); if(srcframes > 0 && dstframes == data.first.len && data.second.len > 0) { /* If some source samples remain, all of the first dest * block was filled, and there's space in the second * dest block, do another run for the second block. */ - dstframes += SampleConverterInput(mSampleConv.get(), &srcdata, &srcframes, - data.second.buf, (ALsizei)minz(data.second.len, INT_MAX)); + dstframes += mSampleConv->convert(&srcdata, &srcframes, data.second.buf, + static_cast<ALsizei>(minz(data.second.len, INT_MAX))); } } else |