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 e-dong committed Jul 26, 2024
1 parent 1381e63 commit ed5c120
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 ed5c120

Please sign in to comment.