Skip to content

Commit

Permalink
fix(audio:windows): set cbSize correctly (LizardByte#1787)
Browse files Browse the repository at this point in the history
  • Loading branch information
everything411 authored and KuleRucket committed Jun 6, 2024
1 parent 079c7af commit f729a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/platform/windows/audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ namespace platf::audio {
wave_format.Format.wBitsPerSample = 16;
wave_format.Format.nBlockAlign = wave_format.Format.nChannels * wave_format.Format.wBitsPerSample / 8;
wave_format.Format.nAvgBytesPerSec = wave_format.Format.nSamplesPerSec * wave_format.Format.nBlockAlign;
wave_format.Format.cbSize = sizeof(wave_format);
wave_format.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);

wave_format.Samples.wValidBitsPerSample = 16;
wave_format.dwChannelMask = format.channel_mask;
Expand Down

0 comments on commit f729a04

Please sign in to comment.