From b779ebb512b840a325b32f258261c37bf36a1b7a Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 12 Dec 2018 21:18:31 -0800 Subject: Fix some MSVC conversion warnings --- Alc/backends/winmm.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Alc/backends/winmm.cpp') diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp index 32cabbde..0d353906 100644 --- a/Alc/backends/winmm.cpp +++ b/Alc/backends/winmm.cpp @@ -361,7 +361,7 @@ ALCboolean ALCwinmmPlayback_start(ALCwinmmPlayback *self) try { std::for_each(self->WaveBuffer.begin(), self->WaveBuffer.end(), [self](WAVEHDR &waveHdr) -> void - { waveOutPrepareHeader(self->OutHdl, &waveHdr, sizeof(WAVEHDR)); } + { waveOutPrepareHeader(self->OutHdl, &waveHdr, static_cast(sizeof(WAVEHDR))); } ); self->Writable.store(self->WaveBuffer.size(), std::memory_order_release); @@ -581,8 +581,9 @@ ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *deviceName) // Allocate circular memory buffer for the captured audio // Make sure circular buffer is at least 100ms in size - DWORD CapturedDataSize{std::max(device->UpdateSize*device->NumUpdates, - BufferSize*self->WaveBuffer.size())}; + auto CapturedDataSize = static_cast( + std::max(device->UpdateSize*device->NumUpdates, BufferSize*self->WaveBuffer.size()) + ); self->Ring = ll_ringbuffer_create(CapturedDataSize, self->Format.nBlockAlign, false); if(!self->Ring) return ALC_INVALID_VALUE; -- cgit v1.2.3