aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/sndio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/sndio.cpp')
-rw-r--r--alc/backends/sndio.cpp4
1 files changed, 2 insertions, 2 deletions
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;