diff options
author | Chris Robinson <[email protected]> | 2023-12-23 03:07:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-23 03:07:57 -0800 |
commit | 4720b2c64d91facea24e8411c104770bd3763afa (patch) | |
tree | 7ab1cc05e307be0b18ef6cc3cc8a84ece8dae624 /alc/backends/sndio.cpp | |
parent | d7304c49a1d2cea2dae0ae38fdd9706dbcdb561f (diff) |
Fix implicit widening after multiplication
Diffstat (limited to 'alc/backends/sndio.cpp')
-rw-r--r-- | alc/backends/sndio.cpp | 4 |
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; |