diff options
author | Chris Robinson <[email protected]> | 2019-09-14 12:44:35 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-09-14 12:44:35 -0700 |
commit | 532197a650729be5e4405fd64f81e4443090a01e (patch) | |
tree | a029aea53b4959b865da8edda438503bcc2d40b5 /alc/backends/winmm.cpp | |
parent | fa64b1fd6d48165d1e028d1ec96174c3b7fc6341 (diff) |
Clean up (most) implicit conversions in the backends
Diffstat (limited to 'alc/backends/winmm.cpp')
-rw-r--r-- | alc/backends/winmm.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alc/backends/winmm.cpp b/alc/backends/winmm.cpp index 76e6fe3b..30a19e13 100644 --- a/alc/backends/winmm.cpp +++ b/alc/backends/winmm.cpp @@ -240,7 +240,7 @@ retry_open: mFormat.wBitsPerSample = 16; } mFormat.nChannels = ((mDevice->FmtChans == DevFmtMono) ? 1 : 2); - mFormat.nBlockAlign = mFormat.wBitsPerSample * mFormat.nChannels / 8; + mFormat.nBlockAlign = static_cast<WORD>(mFormat.wBitsPerSample * mFormat.nChannels / 8); mFormat.nSamplesPerSec = mDevice->Frequency; mFormat.nAvgBytesPerSec = mFormat.nSamplesPerSec * mFormat.nBlockAlign; mFormat.cbSize = 0; @@ -500,9 +500,9 @@ ALCenum WinMMCapture::open(const ALCchar *name) mFormat = WAVEFORMATEX{}; mFormat.wFormatTag = (mDevice->FmtType == DevFmtFloat) ? WAVE_FORMAT_IEEE_FLOAT : WAVE_FORMAT_PCM; - mFormat.nChannels = mDevice->channelsFromFmt(); - mFormat.wBitsPerSample = mDevice->bytesFromFmt() * 8; - mFormat.nBlockAlign = mFormat.wBitsPerSample * mFormat.nChannels / 8; + mFormat.nChannels = static_cast<WORD>(mDevice->channelsFromFmt()); + mFormat.wBitsPerSample = static_cast<WORD>(mDevice->bytesFromFmt() * 8); + mFormat.nBlockAlign = static_cast<WORD>(mFormat.wBitsPerSample * mFormat.nChannels / 8); mFormat.nSamplesPerSec = mDevice->Frequency; mFormat.nAvgBytesPerSec = mFormat.nSamplesPerSec * mFormat.nBlockAlign; mFormat.cbSize = 0; |