aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/coreaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-20 07:57:37 -0700
committerChris Robinson <[email protected]>2019-08-20 07:57:37 -0700
commitce76cc144142a065e2702bd57f4358929c38d1bc (patch)
treecc25d00d7f72ebde699beee3e4838cb53404fc79 /alc/backends/coreaudio.cpp
parent2ab52968f4faa48a0857eaa8423ae7576f64f2d6 (diff)
Use unsigned for the sample and channel converters
Diffstat (limited to 'alc/backends/coreaudio.cpp')
-rw-r--r--alc/backends/coreaudio.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/alc/backends/coreaudio.cpp b/alc/backends/coreaudio.cpp
index cfa7703a..c903ff07 100644
--- a/alc/backends/coreaudio.cpp
+++ b/alc/backends/coreaudio.cpp
@@ -654,15 +654,14 @@ 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>(mConverter->convert(&src0, &src0len, buffer, samples));
+ auto src0len = static_cast<ALuint>(rec_vec.first.len);
+ ALuint got{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>(mConverter->convert(&src1, &src1len,
- static_cast<char*>(buffer)+got, samples-got));
+ auto src1len = static_cast<ALuint>(rec_vec.second.len);
+ got += mConverter->convert(&src1, &src1len, static_cast<char*>(buffer)+got, samples-got);
total_read += rec_vec.second.len - src1len;
}