diff --git a/DShowPlugin/DeviceSource.cpp b/DShowPlugin/DeviceSource.cpp index 7caf945ba..693442acc 100644 --- a/DShowPlugin/DeviceSource.cpp +++ b/DShowPlugin/DeviceSource.cpp @@ -751,7 +751,24 @@ bool DeviceSource::LoadFilters() IPin *audioPin = GetOutputPin(deviceFilter, &MEDIATYPE_Audio); if (audioPin) { - bConnected = SUCCEEDED(err = graph->ConnectDirect(audioPin, audioFilter->GetCapturePin(), nullptr)); + IPin* audioRendererPin = NULL; + +#if 1 // FMB NOTE: Connect with first (= the only) pin of audio renderer + IEnumPins* pIEnum = NULL; + if (SUCCEEDED(err = audioFilter->EnumPins(&pIEnum))) + { + IPin* pIPin = NULL; + pIEnum->Next(1, &audioRendererPin, NULL); + SafeRelease(pIEnum); + } +#else + audioFilter->FindPin(L"Audio Input pin (rendered)", &audioRendererPin); +#endif + if (audioRendererPin) + { + bConnected = SUCCEEDED(err = graph->ConnectDirect(audioPin, audioRendererPin, nullptr)); + audioRendererPin->Release(); + } audioPin->Release(); } } diff --git a/DShowPlugin/DeviceSource.h b/DShowPlugin/DeviceSource.h index c4d801e50..9d7bc7333 100644 --- a/DShowPlugin/DeviceSource.h +++ b/DShowPlugin/DeviceSource.h @@ -115,7 +115,7 @@ class DeviceSource : public ImageSource IBaseFilter *deviceFilter; IBaseFilter *audioDeviceFilter; CaptureFilter *captureFilter; - CaptureFilter *audioFilter; + IBaseFilter *audioFilter; // Audio renderer filter //---------------------------------