aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/winmm.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-08 14:22:20 -0800
committerChris Robinson <[email protected]>2018-12-08 14:22:20 -0800
commitc9f5617f06503d951b3ed808cf07fb6362a7f8d1 (patch)
tree69fa576f29e7394aa76ebf08453c2d06d4bdbb6a /Alc/backends/winmm.cpp
parentfc8da0c16b34a964c637c721ff944e8e6a5f3277 (diff)
Avoid several uses of memset
Diffstat (limited to 'Alc/backends/winmm.cpp')
-rw-r--r--Alc/backends/winmm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alc/backends/winmm.cpp b/Alc/backends/winmm.cpp
index c88a43b6..32cabbde 100644
--- a/Alc/backends/winmm.cpp
+++ b/Alc/backends/winmm.cpp
@@ -246,7 +246,7 @@ ALCenum ALCwinmmPlayback_open(ALCwinmmPlayback *self, const ALCchar *deviceName)
UINT DeviceID{static_cast<UINT>(std::distance(PlaybackDevices.cbegin(), iter))};
retry_open:
- memset(&self->Format, 0, sizeof(WAVEFORMATEX));
+ self->Format = WAVEFORMATEX{};
if(device->FmtType == DevFmtFloat)
{
self->Format.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
@@ -554,7 +554,7 @@ ALCenum ALCwinmmCapture_open(ALCwinmmCapture *self, const ALCchar *deviceName)
return ALC_INVALID_ENUM;
}
- memset(&self->Format, 0, sizeof(WAVEFORMATEX));
+ self->Format = WAVEFORMATEX{};
self->Format.wFormatTag = (device->FmtType == DevFmtFloat) ?
WAVE_FORMAT_IEEE_FLOAT : WAVE_FORMAT_PCM;
self->Format.nChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);