Fix buffer offset for the second conversion

This commit is contained in:
Chris Robinson 2020-11-23 10:43:20 -08:00
parent 31c7eb5c55
commit d062c16629

View File

@ -612,7 +612,7 @@ ALCenum CoreAudioCapture::captureSamples(al::byte *buffer, ALCuint samples)
{ {
const void *src1{rec_vec.second.buf}; const void *src1{rec_vec.second.buf};
auto src1len = static_cast<ALuint>(rec_vec.second.len); auto src1len = static_cast<ALuint>(rec_vec.second.len);
got += mConverter->convert(&src1, &src1len, buffer+got, samples-got); got += mConverter->convert(&src1, &src1len, buffer + got*mFrameSize, samples-got);
total_read += rec_vec.second.len - src1len; total_read += rec_vec.second.len - src1len;
} }