diff options
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/coreaudio.cpp | 7 | ||||
-rw-r--r-- | Alc/backends/wasapi.cpp | 10 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp index 2caa0852..c5da9f24 100644 --- a/Alc/backends/coreaudio.cpp +++ b/Alc/backends/coreaudio.cpp @@ -656,14 +656,13 @@ ALCenum CoreAudioCapture::captureSamples(void *buffer, ALCuint samples) auto rec_vec = mRing->getReadVector(); const void *src0{rec_vec.first.buf}; auto src0len = static_cast<ALsizei>(rec_vec.first.len); - auto got = static_cast<ALuint>(SampleConverterInput(mConverter.get(), &src0, &src0len, - buffer, samples)); + auto got = static_cast<ALuint>(mConverter->convert(&src0, &src0len, buffer, samples)); size_t total_read{rec_vec.first.len - src0len}; if(got < samples && !src0len && rec_vec.second.len > 0) { const void *src1{rec_vec.second.buf}; auto src1len = static_cast<ALsizei>(rec_vec.second.len); - got += static_cast<ALuint>(SampleConverterInput(mConverter.get(), &src1, &src1len, + got += static_cast<ALuint>(mConverter->convert(&src1, &src1len, static_cast<char*>(buffer)+got, samples-got)); total_read += rec_vec.second.len - src1len; } @@ -675,7 +674,7 @@ ALCenum CoreAudioCapture::captureSamples(void *buffer, ALCuint samples) ALCuint CoreAudioCapture::availableSamples() { if(!mConverter) return mRing->readSpace(); - return SampleConverterAvailableOut(mConverter.get(), mRing->readSpace()); + return mConverter->availableOut(mRing->readSpace()); } } // namespace 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 |