[wdmaudiodev] Re: AVStream Audio Frustration

  • From: Matthew van Eerde <Matthew.van.Eerde@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 2 Nov 2012 22:19:25 +0000

GraphEdit uses DirectShow which includes all kinds of format converters above 
you.

Try using KS Studio to instantiate your pin instead; that's much closer to the 
metal.

From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: Friday, November 2, 2012 3:14 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: AVStream Audio Frustration

Matthew van Eerde wrote:

It's good that you're suppressing formats you don't support from your 
advertised data ranges, and from your data intersection handler.  I don't know 
why Windows is trying formats you don't advertise.  Are you also returning 
failing status codes for pin creations when the format is one you don't support?

There's a critical piece of information that is relevant here that I just now 
noticed.  When I created my driver originally, I only had the one output pin.  
That filter shows up in graphedt as a "WDM Capture Device".  It works properly. 
 The pin shows up with exactly the one format in my pin descriptor.  However, 
in that state, sysaudio will not talk to me, so I don't appear as a waveIn 
device.  I can only be used by apps specifically looking for WDM devices.  My 
client is using a Flash webcam app, and that needs a waveIn device.

Yesterday, I finally added a microphone bridge pin and a fake internal node, 
which was sufficient to get sysaudio to acknowledge me.  I now appear as a 
waveIn device, and in the "Audio Capture Devices" list in graphedt.  THAT'S the 
scenario that fails.

To answer your question, I never get the opportunity to fail pin creation.

When my driver restarts, I see a series of create/delete sequences for my 
filter.  I presume this is coming from the Audio Engine.  I can bring up 
graphedt, instantiate my filter, look at the pin properties, and render the 
pin, and ALL OF THAT happens without any communication with my driver.  No pins 
are ever created.  The data intersection handler is not called, even though 
graphedt now shows that the two filters have agreed on a format (44100-S-16, 
which I do not support).

The pin doesn't get created until I start the graph.  At that point, I get a 
SetFormat request for whatever the "Default Format" is in control panel (NOT 
the format shown in graphedt!), and streaming starts.  The data intersection 
handler is never called.  In this case, the SetFormat I got was for 22050-S-16, 
which is different from the pin format in graphedt, but the audio worked, so 
someone is doing a sample rate conversion on my behalf.

So, this is evidently a manifestation of my interaction with sysaudio and the 
Audio Engine, but I still need to know how to fix it.  Basically, I need to 
tell the Audio Engine what my "default audio type" is during initialization.


--

Tim Roberts, timr@xxxxxxxxx<mailto:timr@xxxxxxxxx>

Providenza & Boekelheide, Inc.

Other related posts: