As you can see from my code below, I try both options.. -----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Faby, Paul Gesendet: Dienstag, 15. Februar 2005 17:40 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Re: AW: Re: DirectKS Problem on some machines Have you tried calling with false as the looped param ? createcapturepin(&wfx.Format,FALSE) ?? I checked in my code and if on my capture filter I attempt to use the looped setting true, no pins are created...>?.. I haven't looked that much into it..but, when I change the code back to False for the looped param, it works fine. P -----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Patrick Pfeifer Sent: Tuesday, February 15, 2005 9:31 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] AW: Re: DirectKS Problem on some machines The problem is not the Enumfilters constructor. Appropriate capture filters are found. But afterwards, no pins can be created (by calling _pFilter->CreateCapturePin(&wfx.Format, TRUE) that match the WAVEFORMATEX Structure. I've tried many different sample rates, bit rates, ... no chance. Render filters and pins later can be created. -----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Faby, Paul Gesendet: Dienstag, 15. Februar 2005 17:13 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Re: DirectKS Problem on some machines Have you walked through the Enumfilters::EnumFilters(..) yet? See what it's doing down in the code where the audRenfilter & audCapfilter are created... You might be able to find something useful there. paul -----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Patrick Pfeifer Sent: Tuesday, February 15, 2005 4:56 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] DirectKS Problem on some machines Hello! I implemented a low latency audio I/O streaming using the DirectKS sources. Finally on some machines (with old soundcards, as well as on PC's with new hardware, so I don't think it is a driver problem) that have a wdm-audio-driver, I can't get any capture pins (finding appropriate pins for rendering instead is no problem), although capturing filters have been found. Why can't I get these capture pins in this simple format (see below) if appropriate capturing filters are indeed available? Help would be greatly appreciated. Thank you! As I said, on some machines, this works perfectly well and capable capture pins are found without problems: ... GUID aguidEnumCats[] = { STATIC_KSCATEGORY_AUDIO , STATIC_KSCATEGORY_CAPTURE}; hr = pEnumerator->EnumFilters ( eAudCap, // create audio capture filters ... aguidEnumCats, // ... of these categories 2, // There are 2 categories TRUE, // While you're at it, enumerate the pins FALSE, // ... but don't bother with nodes TRUE // Instantiate the filters ); ThrowOnFail(hr, "CKsEnumFilters::EnumFilters failed"); bool failed=1; while(failed && !pEnumerator->m_listFilters.IsEmpty()) { failed=0; pEnumerator->m_listFilters.GetHead((CKsFilter**)&_pFilter); ThrowOnNull(_pFilter, "No filters available for capturing"); // instantiate the pin as 16bit, 48KHz, stereo // use WAVEFORMATEXTENSIBLE to describe wave format WAVEFORMATEXTENSIBLE wfx; wfx.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE; wfx.Format.nChannels = 1; wfx.Format.nSamplesPerSec = 44100; wfx.Format.nBlockAlign = 2; wfx.Format.nAvgBytesPerSec = wfx.Format.nSamplesPerSec * wfx.Format.nBlockAlign; wfx.Format.wBitsPerSample = 16; wfx.Format.cbSize = sizeof(WAVEFORMATEXTENSIBLE)- sizeof(WAVEFORMATEX); wfx.Samples.wValidBitsPerSample = 16; wfx.dwChannelMask = KSAUDIO_SPEAKER_MONO; wfx.SubFormat = KSDATAFORMAT_SUBTYPE_PCM; _pPin = _pFilter->CreateCapturePin(&wfx.Format, TRUE); if (!_pPin) _pPin = _pFilter->CreateCapturePin(&wfx.Format, FALSE); if (!_pPin) { // driver can't handle WAVEFORMATEXTENSIBLE, so fall back // to WAVEFORMATEX format descriptor and try again wfx.Format.wFormatTag = WAVE_FORMAT_PCM; // set unused members to zero wfx.Format.cbSize = 0; wfx.Samples.wValidBitsPerSample = 0; wfx.dwChannelMask = 0; wfx.SubFormat = GUID_NULL; _pPin = _pFilter->CreateCapturePin(&wfx.Format, TRUE); if (!_pPin) _pPin = _pFilter->CreateCapturePin(&wfx.Format, FALSE); } if (_pPin==NULL) { pEnumerator- >m_listFilters.RemoveHead((CKsFilter**)&_pFilter); failed=1; } } ThrowOnNull(_pPin, "No pins available for capturing"); if (_pPin!=NULL) cout << "Capturing filter and pin found. " << endl; ... ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/ ****************** WDMAUDIODEV addresses: Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx Subscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe Unsubscribe: mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe Moderator: mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx URL to WDMAUDIODEV page: http://www.wdmaudiodev.de/