There seem to be a bug in the way "WMAudio Decoder DMO" decodes WMA Pro audio from WMV files. If the audio is 5.1 channels, it will allways downmix into 2 channel stereo. This is extremely annoying, the result is whenever a WMV file with 6 channel audio is played using direct show, it will be heard as 2 channel only.
In doom9.org (http://forum.doom9.org/showthread.php?t=110449&page=3) they were able to find the reason. It seems that the "WMAudio Decoder DMO" has a property (_HIRESOUTPUT) that forces it to use more then 2 channels. Below is the C++ fix they proposed to Avisynth. Can this be entered to MP as well?
Edit: here is the MSDN article about this issue: http://msdn.microsoft.com/library/d...htm/multichannelaudioplaybackindirectshow.asp
IGraphBuilder *pGraph;
HRESULT hres;
IBaseFilter * pDmoFilter;
hres = CoCreateInstance(CLSID_DMOWrapperFilter, NULL,
CLSCTX_INPROC, IID_IBaseFilter, (void **)&pDmoFilter);
IDMOWrapperFilter *pWrap;
pDmoFilter->QueryInterface(IID_IDMOWrapperFilter, (void **)&pWrap);
hres = pWrap->Init(CLSID_CWMADecMediaObject, CLSID_CWMADecMediaObject);
pWrap->Release();
IPropertyBag *pPropertyBag = NULL;
hres = pDmoFilter->QueryInterface(IID_IPropertyBag, (void**)&pPropertyBag);
hres = SetHiResOutput(pPropertyBag);
hres = pGraph->AddFilter(pDmoFilter, L"WMA Filter");
hres = pGraph->RenderFile(FileName, NULL);
HRESULT SetHiResOutput(IPropertyBag* pBag)
{
HRESULT hr = S_OK;
VARIANT myVar;
VARIANT myVar2;
VariantInit(&myVar);
VariantInit(&myVar2);
myVar.vt = VT_BOOL;
myVar.boolVal = TRUE;
myVar2.vt = VT_I4;
myVar2.iVal = DSSPEAKER_DIRECTOUT;
hr = pBag->Write(g_wszWMACHiResOutput, &myVar);
hr = pBag->Write(g_wszWMACSpeakerConfig, &myVar2);
return hr;
}
In doom9.org (http://forum.doom9.org/showthread.php?t=110449&page=3) they were able to find the reason. It seems that the "WMAudio Decoder DMO" has a property (_HIRESOUTPUT) that forces it to use more then 2 channels. Below is the C++ fix they proposed to Avisynth. Can this be entered to MP as well?
Edit: here is the MSDN article about this issue: http://msdn.microsoft.com/library/d...htm/multichannelaudioplaybackindirectshow.asp
IGraphBuilder *pGraph;
HRESULT hres;
IBaseFilter * pDmoFilter;
hres = CoCreateInstance(CLSID_DMOWrapperFilter, NULL,
CLSCTX_INPROC, IID_IBaseFilter, (void **)&pDmoFilter);
IDMOWrapperFilter *pWrap;
pDmoFilter->QueryInterface(IID_IDMOWrapperFilter, (void **)&pWrap);
hres = pWrap->Init(CLSID_CWMADecMediaObject, CLSID_CWMADecMediaObject);
pWrap->Release();
IPropertyBag *pPropertyBag = NULL;
hres = pDmoFilter->QueryInterface(IID_IPropertyBag, (void**)&pPropertyBag);
hres = SetHiResOutput(pPropertyBag);
hres = pGraph->AddFilter(pDmoFilter, L"WMA Filter");
hres = pGraph->RenderFile(FileName, NULL);
HRESULT SetHiResOutput(IPropertyBag* pBag)
{
HRESULT hr = S_OK;
VARIANT myVar;
VARIANT myVar2;
VariantInit(&myVar);
VariantInit(&myVar2);
myVar.vt = VT_BOOL;
myVar.boolVal = TRUE;
myVar2.vt = VT_I4;
myVar2.iVal = DSSPEAKER_DIRECTOUT;
hr = pBag->Write(g_wszWMACHiResOutput, &myVar);
hr = pBag->Write(g_wszWMACSpeakerConfig, &myVar2);
return hr;
}