mirror of https://github.com/mpv-player/mpv
ao/wasapi: more consistent/reliable method of computing extra WAVEFORMATEXTENSIBLE size
This commit is contained in:
parent
8908b80b77
commit
b0854bc42c
|
@ -172,8 +172,7 @@ static void set_format(WAVEFORMATEXTENSIBLE *wformat, WORD bytepersample,
|
||||||
wformat->Format.nAvgBytesPerSec = samplerate * block_align;
|
wformat->Format.nAvgBytesPerSec = samplerate * block_align;
|
||||||
wformat->Format.nBlockAlign = block_align;
|
wformat->Format.nBlockAlign = block_align;
|
||||||
wformat->Format.wBitsPerSample = bytepersample * 8;
|
wformat->Format.wBitsPerSample = bytepersample * 8;
|
||||||
wformat->Format.cbSize =
|
wformat->Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE) - sizeof(WAVEFORMATEX);
|
||||||
22; /* must be at least 22 for WAVE_FORMAT_EXTENSIBLE */
|
|
||||||
if (bytepersample == 4)
|
if (bytepersample == 4)
|
||||||
wformat->SubFormat = mp_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
wformat->SubFormat = mp_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue