Hi!
DirectShowSource loaded movie file with 6 channels PCM audio. However it was definitely stereo. GraphStudioNext renders graph with filters all have 2 channel In/Out pins.
My fix.
I downloaded sources of DirectShowSource plugin and added one line:
HRESULT GetSample::InternalQueryAccept(const AM_MEDIA_TYPE* pmt, VideoInfo &vi)
...........................................
WAVEFORMATEX* wex = (WAVEFORMATEX*)pmt->pbFormat;
>>>> if(wex->nChannels != 2) return S_FALSE;
I hardcoded stereo here and it solved my issue. It successfully passed then with value
wex->nChannels == 2.
Maybe you should add it as an option in DirectShowSource constructor if one wants to try force channels count.
Also I found this topic so the problem is not only mine:
http://forum.doom9.org/archive/index.php/t-160109.html
Of course your patch disallows any mono or genuine multi channel pin connections.
But I see your problem, the audio decoder bids 6 channel first even for stereo sources, DirectShowSource accepts the bid. With your patch, you refuse the 6 channel bid, so it next bids 2 channel, which you then accept.
Which audio decoder is giving this behaviour?
I have reassigned this as a Feature Request "DirectShowSource option to force audio channel count"
Sorry for late respond
>>Which audio decoder is giving this behaviour?
I dont know. How can I find it put?
My graph looks like this:
1. Haali Media Splitter 1.11.288.0
2. Microsoft DTV-DVD Audio Decoder
3. ffdshow Audio Decoder
4. Default DirectSound Device