aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/wasapi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/wasapi.cpp')
-rw-r--r--alc/backends/wasapi.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/alc/backends/wasapi.cpp b/alc/backends/wasapi.cpp
index 55c95146..b762da76 100644
--- a/alc/backends/wasapi.cpp
+++ b/alc/backends/wasapi.cpp
@@ -942,10 +942,10 @@ HRESULT WasapiPlayback::resetProxy()
}
OutputType.Format.nSamplesPerSec = mDevice->Frequency;
- OutputType.Format.nBlockAlign = OutputType.Format.nChannels *
- OutputType.Format.wBitsPerSample / 8;
+ OutputType.Format.nBlockAlign = static_cast<WORD>(OutputType.Format.nChannels *
+ OutputType.Format.wBitsPerSample / 8);
OutputType.Format.nAvgBytesPerSec = OutputType.Format.nSamplesPerSec *
- OutputType.Format.nBlockAlign;
+ OutputType.Format.nBlockAlign;
TraceFormat("Requesting playback format", &OutputType.Format);
hr = mClient->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, &OutputType.Format, &wfx);
@@ -1474,10 +1474,10 @@ HRESULT WasapiCapture::resetProxy()
OutputType.Samples.wValidBitsPerSample = OutputType.Format.wBitsPerSample;
OutputType.Format.nSamplesPerSec = mDevice->Frequency;
- OutputType.Format.nBlockAlign = OutputType.Format.nChannels *
- OutputType.Format.wBitsPerSample / 8;
+ OutputType.Format.nBlockAlign = static_cast<WORD>(OutputType.Format.nChannels *
+ OutputType.Format.wBitsPerSample / 8);
OutputType.Format.nAvgBytesPerSec = OutputType.Format.nSamplesPerSec *
- OutputType.Format.nBlockAlign;
+ OutputType.Format.nBlockAlign;
OutputType.Format.cbSize = sizeof(OutputType) - sizeof(OutputType.Format);
TraceFormat("Requesting capture format", &OutputType.Format);