diff options
Diffstat (limited to 'Alc/backends')
-rw-r--r-- | Alc/backends/coreaudio.cpp | 2 | ||||
-rw-r--r-- | Alc/backends/wasapi.cpp | 2 | ||||
-rw-r--r-- | Alc/backends/winmm.cpp | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/Alc/backends/coreaudio.cpp b/Alc/backends/coreaudio.cpp index f5574965..b2f6d2d3 100644 --- a/Alc/backends/coreaudio.cpp +++ b/Alc/backends/coreaudio.cpp @@ -68,7 +68,7 @@ static void ALCcoreAudioPlayback_Construct(ALCcoreAudioPlayback *self, ALCdevice SET_VTABLE2(ALCcoreAudioPlayback, ALCbackend, self); self->FrameSize = 0; - memset(&self->Format, 0, sizeof(self->Format)); + self->Format = AudioStreamBasicDescription{}; } static void ALCcoreAudioPlayback_Destruct(ALCcoreAudioPlayback *self) diff --git a/Alc/backends/wasapi.cpp b/Alc/backends/wasapi.cpp index 04afe807..b928682f 100644 --- a/Alc/backends/wasapi.cpp +++ b/Alc/backends/wasapi.cpp @@ -637,7 +637,7 @@ FORCE_ALIGN int ALCwasapiPlayback_mixerProc(ALCwasapiPlayback *self) ALCboolean MakeExtensible(WAVEFORMATEXTENSIBLE *out, const WAVEFORMATEX *in) { - memset(out, 0, sizeof(*out)); + *out = WAVEFORMATEXTENSIBLE{}; if(in->wFormatTag == WAVE_FORMAT_EXTENSIBLE) *out = *(const WAVEFORMATEXTENSIBLE*)in; else if(in->wFormatTag == WAVE_FORMAT_PCM) 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); |