aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-23 03:07:57 -0800
committerChris Robinson <[email protected]>2023-12-23 03:07:57 -0800
commit4720b2c64d91facea24e8411c104770bd3763afa (patch)
tree7ab1cc05e307be0b18ef6cc3cc8a84ece8dae624 /alc
parentd7304c49a1d2cea2dae0ae38fdd9706dbcdb561f (diff)
Fix implicit widening after multiplication
Diffstat (limited to 'alc')
-rw-r--r--alc/backends/oss.cpp2
-rw-r--r--alc/backends/pipewire.cpp2
-rw-r--r--alc/backends/sndio.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/alc/backends/oss.cpp b/alc/backends/oss.cpp
index 9a4aa9a8..50bed5ee 100644
--- a/alc/backends/oss.cpp
+++ b/alc/backends/oss.cpp
@@ -409,7 +409,7 @@ bool OSSPlayback::reset()
setDefaultChannelOrder();
- mMixData.resize(mDevice->UpdateSize * mDevice->frameSizeFromFmt());
+ mMixData.resize(size_t{mDevice->UpdateSize} * mDevice->frameSizeFromFmt());
return true;
}
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp
index 7b206d2d..44b84296 100644
--- a/alc/backends/pipewire.cpp
+++ b/alc/backends/pipewire.cpp
@@ -1771,7 +1771,7 @@ void PipeWirePlayback::start()
mDevice->UpdateSize = updatesize;
mDevice->BufferSize = static_cast<uint>(ptime.buffered + delay +
- totalbuffers*updatesize);
+ uint64_t{totalbuffers}*updatesize);
break;
}
#else
diff --git a/alc/backends/sndio.cpp b/alc/backends/sndio.cpp
index 2cb577fd..0e667874 100644
--- a/alc/backends/sndio.cpp
+++ b/alc/backends/sndio.cpp
@@ -228,7 +228,7 @@ retry_params:
mDevice->UpdateSize = par.round;
mDevice->BufferSize = par.bufsz + par.round;
- mBuffer.resize(mDevice->UpdateSize * par.pchan*par.bps);
+ mBuffer.resize(size_t{mDevice->UpdateSize} * par.pchan*par.bps);
if(par.sig == 1)
std::fill(mBuffer.begin(), mBuffer.end(), std::byte{});
else if(par.bits == 8)
@@ -458,7 +458,7 @@ void SndioCapture::open(std::string_view name)
DevFmtTypeString(mDevice->FmtType), DevFmtChannelsString(mDevice->FmtChans),
mDevice->Frequency, par.sig?'s':'u', par.bps*8, par.rchan, par.rate};
- mRing = RingBuffer::Create(mDevice->BufferSize, par.bps*par.rchan, false);
+ mRing = RingBuffer::Create(mDevice->BufferSize, size_t{par.bps}*par.rchan, false);
mDevice->BufferSize = static_cast<uint>(mRing->writeSpace());
mDevice->UpdateSize = par.round;