mfplat: Add support for AudioFormat_Float in MFCreateWaveFormatExFromMFMediaType.
Add support for the MFAudioFormat_Float subtype in MFCreateWaveFormatExFromMFMediaType. Signed-off-by: Connor McAdams <cmcadams@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e685718c3b
commit
538b702c87
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue