Skip to content

Commit

Permalink
AudioSwitcher - в некоторых случаях мог не подключиться к MPC Audio R…
Browse files Browse the repository at this point in the history
…enderer.
  • Loading branch information
Aleksoid1978 committed Dec 4, 2024
1 parent 44b5086 commit 54725e0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/filters/switcher/AudioSwitcher/StreamSwitcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1150,10 +1150,12 @@ HRESULT CStreamSwitcherOutputPin::CompleteConnect(IPin* pReceivePin)
&& SUCCEEDED(pIn->GetConnected()->ConnectionMediaType(&mt))) {
m_pSSF->TransformMediaType(mt, m_bForce16Bit);
if (m_mt != mt) {
if (pIn->GetConnected()->QueryAccept(&m_mt) == S_OK) {
hr = m_pFilter->ReconnectPin(pIn->GetConnected(), &m_mt);
} else {
hr = VFW_E_TYPE_NOT_ACCEPTED;
if (auto clsid = GetCLSID(pReceivePin); clsid != CLSID_MpcAudioRenderer && clsid != CLSID_SanearAudioRenderer) {
if (pIn->GetConnected()->QueryAccept(&m_mt) == S_OK) {
hr = m_pFilter->ReconnectPin(pIn->GetConnected(), &m_mt);
} else {
hr = VFW_E_TYPE_NOT_ACCEPTED;
}
}
}
}
Expand Down

2 comments on commit 54725e0

@v0lt
Copy link
Collaborator

@v0lt v0lt commented on 54725e0 Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пожалуйста, напиши подробнее в каких случаях есть проблема с подключением AudioSwitcher к MpcAudioRenderer.

@v0lt
Copy link
Collaborator

@v0lt v0lt commented on 54725e0 Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Если речь о Issue #648, то рабочее решение для частот более 192 кГц находиться по ссылке.
if (samplerate > 192000) { // 192 kHz is limit for DirectSound
Только оно для DirectSound.

Please sign in to comment.