Commit 538b702c authored by Connor McAdams's avatar Connor McAdams Committed by Alexandre Julliard

mfplat: Add support for AudioFormat_Float in MFCreateWaveFormatExFromMFMediaType.

Add support for the MFAudioFormat_Float subtype in MFCreateWaveFormatExFromMFMediaType. Signed-off-by: 's avatarConnor McAdams <cmcadams@codeweavers.com> Signed-off-by: 's avatarNikolay Sivov <nsivov@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e685718c
......@@ -2884,7 +2884,7 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
if (!IsEqualGUID(&major, &MFMediaType_Audio))
return E_INVALIDARG;
if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM))
if (!IsEqualGUID(&subtype, &MFAudioFormat_PCM) && !IsEqualGUID(&subtype, &MFAudioFormat_Float))
{
FIXME("Unsupported audio format %s.\n", debugstr_guid(&subtype));
return E_NOTIMPL;
......@@ -2908,7 +2908,12 @@ HRESULT WINAPI MFCreateWaveFormatExFromMFMediaType(IMFMediaType *mediatype, WAVE
memset(format, 0, *size);
format->wFormatTag = format_ext ? WAVE_FORMAT_EXTENSIBLE : WAVE_FORMAT_PCM;
if (format_ext)
format->wFormatTag = WAVE_FORMAT_EXTENSIBLE;
else if (IsEqualGUID(&subtype, &MFAudioFormat_Float))
format->wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
else
format->wFormatTag = WAVE_FORMAT_PCM;
if (SUCCEEDED(IMFMediaType_GetUINT32(mediatype, &MF_MT_AUDIO_NUM_CHANNELS, &value)))
format->nChannels = value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment