From 4e2e48d29efc2a08da14b92ee7ecc22481b1420b Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 26 Oct 2016 15:36:22 +1000 Subject: [PATCH] DirectSound: Fix compilation error with MSVC when compiling as C++. --- mini_al.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mini_al.h b/mini_al.h index 8065dca6..0bf2d2a8 100644 --- a/mini_al.h +++ b/mini_al.h @@ -1705,7 +1705,7 @@ static mal_result mal_device_init__dsound(mal_device* pDevice, mal_device_type t wf.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; wf.Format.nChannels = (WORD)pConfig->channels; wf.Format.nSamplesPerSec = (DWORD)pConfig->sampleRate; - wf.Format.wBitsPerSample = mal_get_sample_size_in_bytes(pConfig->format)*8; + wf.Format.wBitsPerSample = (WORD)mal_get_sample_size_in_bytes(pConfig->format)*8; wf.Format.nBlockAlign = (wf.Format.nChannels * wf.Format.wBitsPerSample) / 8; wf.Format.nAvgBytesPerSec = wf.Format.nBlockAlign * wf.Format.nSamplesPerSec; wf.Samples.wValidBitsPerSample = wf.Format.wBitsPerSample;