aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/wasapi.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/wasapi.cpp
parent2ab52968f4faa48a0857eaa8423ae7576f64f2d6 (diff)
Use unsigned for the sample and channel converters
Diffstat (limited to 'alc/backends/wasapi.cpp')
-rw-r--r--alc/backends/wasapi.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index cc53be66..dbf1208d 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -1229,10 +1229,10 @@ FORCE_ALIGN int WasapiCapture::recordProc()
if(mSampleConv)
{
const ALvoid *srcdata{rdata};
- auto srcframes = static_cast<ALsizei>(numsamples);
+ ALuint srcframes{numsamples};
dstframes = mSampleConv->convert(&srcdata, &srcframes, data.first.buf,
- static_cast<ALsizei>(minz(data.first.len, INT_MAX)));
+ static_cast<ALuint>(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
@@ -1240,14 +1240,14 @@ FORCE_ALIGN int WasapiCapture::recordProc()
* dest block, do another run for the second block.
*/
dstframes += mSampleConv->convert(&srcdata, &srcframes, data.second.buf,
- static_cast<ALsizei>(minz(data.second.len, INT_MAX)));
+ static_cast<ALuint>(minz(data.second.len, INT_MAX)));
}
}
else
{
const auto framesize = static_cast<ALuint>(mDevice->frameSizeFromFmt());
- size_t len1 = minz(data.first.len, numsamples);
- size_t len2 = minz(data.second.len, numsamples-len1);
+ size_t len1{minz(data.first.len, numsamples)};
+ size_t len2{minz(data.second.len, numsamples-len1)};
memcpy(data.first.buf, rdata, len1*framesize);
if(len2 > 0)