Have you got any other KS mode apps you can use to sanity check ? I find the
Sonar 4 demo most helpful in this respect. www.cakewalk.com
----- Original Message -----
From: "Patrick Pfeifer" <patrick_pfeifer@xxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Tuesday, February 15, 2005 10:45 PM
Subject: [wdmaudiodev] AW: Re: AW: Re: AW: Re: AW: Re: AW: Re: DirectKS
Problem on some machines
It's an onboard soundcard: Crystal (today Cirrus Logic) SoundFusion CS-4280, WinXP.
-----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Faby, Paul Gesendet: Dienstag, 15. Februar 2005 23:43 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Re: AW: Re: AW: Re: AW: Re: AW: Re: DirectKS Problem on some machines
Actually, I think you're ACCESS MASK 0xc0000000 is correct, I think that's the code for GENERIC_WRITE | GENERIC_READ. What type of device is this.? Just a usb audio device? Is this on XP? -----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Patrick Pfeifer Sent: Tuesday, February 15, 2005 3:29 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] AW: Re: AW: Re: AW: Re: AW: Re: DirectKS Problem on some machines
Filter handle is valid, ACCESS MASK is 0xc0000000, so I guess that's the problem. Unfortunately, I can't afford a MSDN subscription, so I don't have the DDK. Is there any possibility to download the mentioned tool somewhere or can you email it to me?
Thank you!
-----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Faby, Paul Gesendet: Dienstag, 15. Februar 2005 22:56 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Re: AW: Re: AW: Re: AW: Re: DirectKS Problem on some machines
Have you used KS Studio tool in the ddk to check out the details of the filter and the pins? I have not seen creatpin fail with the codes you're showing though, sorry. So you do find a pin that can capture, it's just when you actually go to create it fails.hmmm.. What are you using for the ACCESS_MASK? Is the Filter Handle valid at this point?
-----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Patrick Pfeifer Sent: Tuesday, February 15, 2005 2:40 PM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] AW: Re: AW: Re: AW: Re: DirectKS Problem on some machines
Everything's fine until this point:
In function: ..
DWORD KsCreatePin ( IN HANDLE FilterHandle, IN PKSPIN_CONNECT Connect, IN ACCESS_MASK DesiredAccess, OUT PHANDLE ConnectionHandle )
the return value given by: ..
return DllKsCreatePin(FilterHandle, Connect, DesiredAccess, ConnectionHandle)
.. is: dwResult=87 (decimal) following hr-value determined by HRESULT_FROM_WIN32(dwResult): hr=E_INVALIDARG
Any Help??
-----Ursprüngliche Nachricht----- Von: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] Im Auftrag von Faby, Paul Gesendet: Dienstag, 15. Februar 2005 18:04 An: wdmaudiodev@xxxxxxxxxxxxx Betreff: [wdmaudiodev] Re: AW: Re: AW: Re: DirectKS Problem on some machines
Have you tried calling it first with the "false" param? My code fails if I attempt to call with looped param = true the first time. As in your code below.
When findViableCapturePin is called, does the m_listcaptureSinkPins have a count?If so, does it get into the loop checking "IsFormatSupported" ..? or does it not get this far?
-----Original Message----- From: wdmaudiodev-bounce@xxxxxxxxxxxxx [mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Patrick Pfeifer Sent: Tuesday, February 15, 2005 9:43 AM To: wdmaudiodev@xxxxxxxxxxxxx Subject: [wdmaudiodev] AW: Re: AW: Re: DirectKS Problem on some machines
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/
******************
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/
******************
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/